@fluent/react 0.13.0
-
Add the
useLocalizationhook. (#467, #475)The hook can be used to get a reference to the current
ReactLocalizationinstance, for example in order to format a
translation with the imperativegetStringAPI.let {l10n} = useLocalization(); alert(l10n.getString("hello"));
-
Remove
compat.jsbuilds and compile everything to ES2018. (#472)TypeScript source code is now compiled to ES2018 files in the
esm/
directory. These files are then bundled into a singleindex.jsUMD file
without any further transpilation.The
compat.jsbuild (available as@fluent/react/compat) was removed.
Please use your own transpilation pipeline if ES2018 is too recent for
your project.Refer to https://github.com/projectfluent/fluent.js/wiki/Compatibility
for more information. -
Require
@fluent/bundle0.16.0 as peer dependency.In
@fluent/bundle0.16.0FluentArgumentwas renamed toFluentVariable.