You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this issue when setting up react-i18next with gatsby when hot reloading the translations weren't working. This was a major troll not gonna lie lol.
My current work around is to turn off memoize in the dev environment but I feel like this should be something handled by this library or provide a way to manually clear the cache.
The text was updated successfully, but these errors were encountered:
setting i18next.services.i18nFormat.mem = {} should do the trick. Not sure how we should handle this...we do not really know if this runs in development or production.
Doing this in my codebase seems very fragile since mem is a private field. If anything, could you provide a public and documented API to clear the cache?
Feel free to add a PR which adds either a clearCache function or options to set bindings for store and i18next event (defaulting to none) which clears the cache on events defined passed as options like we eg. do in react-i18next: https://github.com/i18next/react-i18next/blob/master/src/context.js#L4
I ran into this issue when setting up react-i18next with gatsby when hot reloading the translations weren't working. This was a major troll not gonna lie lol.
My current work around is to turn off
memoize
in the dev environment but I feel like this should be something handled by this library or provide a way to manually clear the cache.The text was updated successfully, but these errors were encountered: