From 9a2118963527cb3271fead13b8189943994eb5cc Mon Sep 17 00:00:00 2001 From: lburrack Date: Fri, 16 Feb 2024 11:05:22 -0500 Subject: [PATCH] doc(issue-2259): Document react state issue Updated README to explain on the best way to solve an issue where react state is getting cleared between pages navigations. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index aa36b5bb..f336ec17 100644 --- a/README.md +++ b/README.md @@ -400,6 +400,20 @@ This means that the i18n configuration file will be in the same directory as `ne **Notice** If your config `next-i18next.config.js` is not in the same directory as `next.config.js`, you must copy it manually (or by custom script). +#### Adding next-i18next incrementally + +If you are planning on incrementally add next-i18next to you project we recommended that you will pass your `next-i18next.config` to `appWithTranslation` to avoid any issues. + +i.e + +```js +import nextI18nextConfig from '../../next-i18next.config'; +//... +export default appWithTranslation(MyApp, nextI18nextConfig); +``` + +See Issue [#2259](https://github.com/i18next/next-i18next/issues/2259) for more information. + ## Notes ### Vercel and Netlify