APSL / redux-i18n

A simple and powerful package for translate your react applications using react-redux.
MIT License
233 stars 52 forks source link

fix: use react forceUpdate instead of deep-force-update #130

Closed nicolascrop closed 3 years ago

nicolascrop commented 3 years ago

Got a bug which only occurred in production build. (react-script build && serve -s build). If i had to rerender I18n component due to a setLanguage it would crash the application. The error occurend on this line in react-deep-force-update package. (root was undefined).

The error: image

I wrote a new Component which use React forceUpdate method and it worked like a charm. Feel free to use it, might save a day or two for the next one.

francescarpi commented 3 years ago

Thanks!