-
Hi, i'm trying to create: My app used
What is the correct way to make Redux work in I disable SSR (IDK why my /app still renders on server invoking error, regarding to export default {
appDirectory: "src",
ssr: false,
async prerender() {
return ["/"];
},
} satisfies Config; My providers are in entry.cient.tsx: hydrateRoot(
document,
<StrictMode>
<ThemeProvider> // ShadCn
<Auth0Provider> // need `window`
<AuthProvider> // my Auth0 wrapper
<Provider store={store}> // Redux provider, need indexedDb
<HydratedRouter />
</Provider>
</AuthProvider>
</Auth0Provider>
</ThemeProvider>
</StrictMode> my routes: export default [
route("/", "./features/landing-page/components/LandingPage.tsx"),
route("/app", "./pages/App.tsx", [
route(
"/app/book",
"./layouts/BookContainerLayout/BookContainerLayout.tsx",
[
route(
"/app/book/page/:uuid",
"./layouts/MainContainerLayout/MainContainerLayout.tsx"
),
]
),
]), |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I noticed that error is present, when i enable preloading of export default {
appDirectory: "src",
ssr: false,
// async prerender() { if i remove this, my app seems to work as usual SPA without redux errors
// return ["/"];
// },
} satisfies Config; So i guess, that pre-rendering Any way i can make |
Beta Was this translation helpful? Give feedback.
-
I solved this. Needed to add reduxProvider in app.tsx https://philrich.dev/react-router-migration/#moving-providers |
Beta Was this translation helpful? Give feedback.
I solved this. Needed to add reduxProvider in app.tsx https://philrich.dev/react-router-migration/#moving-providers