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
Long story short I have route names stored in the handle key of my RouteObjects that need to be translated using react-i18next.
Example/index.ts:
const routes = {
path: "/example",
handle: {
// I'm not sure how to use the translate function properly below
text: t("Example Page"),
crumb: (data: object) => ({ ...data, text: t("Example Page") }),
},
element: <ExamplePage />,
...
}
export default routes;
I have opened up a StackOverflow question here and opened up a GitHub discussion with the i18next repo here. Please advise on how to move forward using the createBrowserRouter. It is my understanding that createBrowserRouter() should only be called one time during the life of the SPA.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Long story short I have route names stored in the
handle
key of my RouteObjects that need to be translated using react-i18next.Example/index.ts:
I have opened up a StackOverflow question here and opened up a GitHub discussion with the i18next repo here. Please advise on how to move forward using the createBrowserRouter. It is my understanding that createBrowserRouter() should only be called one time during the life of the SPA.
Beta Was this translation helpful? Give feedback.
All reactions