I have multiple widgets injected into the main project. Each widget is wrapped in a TolgeeProvider with its own TolgeeInstance. The main project is also wrapped and uses useSuspense to dynamically load translations by routes.
|
let LAST_TOLGEE_INSTANCE: TolgeeInstance | undefined = undefined; |
Since LAST_TOLGEE_INSTANCE is defined at the top level, each new provider render overrides the previous one, stopping translations from loading
I have multiple widgets injected into the main project. Each widget is wrapped in a
TolgeeProviderwith its ownTolgeeInstance. The main project is also wrapped and usesuseSuspenseto dynamically load translations by routes.tolgee-js/packages/react/src/TolgeeProvider.tsx
Line 22 in d8424b3
Since
LAST_TOLGEE_INSTANCEis defined at the top level, each new provider render overrides the previous one, stopping translations from loading