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
Hi, i dont get it how to disable SSR for all pages at _app.jsx .
I tryed this:
import dynamic from "next/dynamic";
// Client-side cache, shared for the whole session of the user in the browser.
const clientSideEmotionCache = createEmotionCache();
export default function MyApp(props) {
const { Component, emotionCache = clientSideEmotionCache, pageProps } = props;
return dynamic( () =>
(<CacheProvider value={emotionCache}>
<Head>
<title>My App</title>
<meta name="viewport" content="initial-scale=1, width=device-width" />
</Head>
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
<Component {...pageProps} />
</ThemeProvider>
</CacheProvider>),
{ ssr: false }
);
}
But it doesnt work and i get this error:
Unhandled Runtime Error
Error: Objects are not valid as a React child (found: object with keys {$$typeof, render}). If you meant to render a collection of children, use an array instead.
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
-
Hi, i dont get it how to disable SSR for all pages at _app.jsx .
I tryed this:
But it doesnt work and i get this error:
Anyone can help? Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions