Open addlistener opened 3 months ago
The answer is different depending if you use the App Router or the Pages Router. Could you let me know which one you're using?
I'm using pages router only.
I used to have both but later refactored app router to pages router because I couldn't make the official examples of server.ts
& client.ts
to work lol. Either one I import I get an error of cannot import in client/server. Not to mention mundane issues like https://github.com/QuiiBz/next-international/issues/379#issue-2199627303
But I guess it's app router not next-international. So I abandoned app router.
it could be useful in many ways if we want to access locale outside the react component
For example, providing a custom callback to sync with NEXT_LOCALE.
I know we can create a useEffect to achieve that. Is there a recommended way?