fluent-react 0.7.0 (May 18, 2018)
Pre-release-
Protect void elements against translated text content. (#174)
Text content found in the translated markup is now ignored when the
element passed as a prop to<Localized>is a known void element. This
prevents the element is a void element tag and must neither have
children nor use dangerouslySetInnerHTML error in React.For instance,
<input>is a known void element and it must not have the
text content set by the buggy translation in the following example:<Localized id="hello" text-input={<input type="text" />}> <div /> </Localized>
hello = Hello, <text-input>invalid text content</text-input>.Due to this change some build setups might now require the
@babel/plugin-proposal-object-rest-spreador the
@babel/plugin-syntax-object-rest-spreadplugin. -
Support HTML entities in translations. (#183)
Translations with HTML entities will now trigger the markup sanitization
logic and will be consequently parsed into the characters they represent. -
Re-render
withLocalization-components on l10n changes. (#196)Components enhanced by the
withLocalizationare now re-rendered when
the enclosing<LocalizationProvider>receives a new value of the
messagesprop. -
Use compat dependencies only in fluent-react/compat. (#193)
When
fluent-reactis imported asfluent-reactit will now use the
untranspiled version of itsfluentdependency for consistency. When
it's imported asfluent-react/compatit will usefluent/compattoo.Due to this change some build setups might now require the
@babel/plugin-proposal-async-generator-functionsor the
@babel/plugin-syntax-async-generatorsplugin. -
Upgrade to Babel 7. (#126)
fluent-react/compatis now built with Babel 7.