Closed jimporter closed 7 years ago
No preferred way as far as fluent-react
is concerned. I intentionally tried to make it as agnostic as possible to the way translations are fetched and stored. My goal was to allow fluent-react
to be integrated in various existing codebases at the expense of asking developers to write the IO for translations.
I'd say it's okay to keep it in React unless you want to store translations together with the user's language preferences and it's easier to do in a l10nReducer
. Or maybe if you're doing something fancy with state hydration, but that might not even be a good practice for localization in case the translations are updated.
@stasm Cool, thanks for the explanation. I think we can just close this for now, since nothing you said makes me feel like we need to put our state in Redux. Maybe when we have other locales, this will change, but we can always reopen. :)
fluent-react
has some examples showing how to store localization data in a Redux store. Currently, we're just holding it in React, but maybe Redux would be a better spot. @stasm Is there a preferred place to put localization messages?