Replies: 2 comments 8 replies
-
Hello, In React 18 (Next.js 15), returning a JSX code fragment containing styles in the To fix the issue, make sure the styles: [
...React.Children.toArray(initialProps.styles),
sheet.getStyleElement(),
], |
Beta Was this translation helpful? Give feedback.
-
Solution : and you can change the code import Document, { export default class MyDocument extends Document {
} ); } } |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am upgrading from
Next 12
toNext 15
, I am using the old page routing and currently not planning to migrate to the app router.I want to configure
styled-components
in the server but I am getting an error which was working well inNext 12
._document.tsx
:error
:This line is the reason of the error
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
Beta Was this translation helpful? Give feedback.
All reactions