Skip to content

Commit eace008

Browse files
committed
README update
1 parent 66a1861 commit eace008

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,25 @@ export const links = [
291291
3. Add the `initClient` function to your `entry.client.tsx` file. This is needed to initialize the route boundaries functionality and possible future functionality. (Refer to getting started steps above on how to do that)
292292
4. Add the `initServer` function to your `entry.server.tsx` file. This is needed to initialize the route boundaries functionality (and not cause hydration issues) and possible future functionality. (Refer to getting started steps above on how to do that)
293293
5. You are good to go!
294-
## Troubleshooting [v1 only]
294+
## Troubleshooting
295295

296-
296+
### Hydration issues and Remix Development tools crashing with i18n
297+
298+
Make sure you're passing the same context to the `i18n.getRouteNamespaces()` function as you're passing to the `<RemixServer>` component.
299+
300+
```diff
301+
+ const context =
302+
+ process.env.NODE_ENV === "development"
303+
+ ? await import("remix-development-tools").then(({ initServer }) => initServer(remixContext))
304+
+ : remixContext;
305+
...
306+
- let ns = i18n.getRouteNamespaces(remixContext);
307+
+ let ns = i18n.getRouteNamespaces(context);
308+
...
309+
<I18nextProvider i18n={instance}>
310+
+ <RemixServer abortDelay={ABORT_DELAY} context={context} url={request.url} />
311+
</I18nextProvider>
312+
```
297313
### HMR is failing with RDT
298314

299315
Wrap the `RemixDevTools` component in a `Suspense` component.

0 commit comments

Comments
 (0)