We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code like:
'use client' import React, { useState } from 'react' import { useServerInsertedHTML } from 'next/navigation' import rtlPlugin from "stylis-plugin-rtl"; import { ServerStyleSheet, StyleSheetManager } from 'styled-components'; export default function StyledComponentsRegistry({ children, }: { children: React.ReactNode }) { const [styledComponentsStyleSheet, seet] = useState(() => { return new ServerStyleSheet(); }); useServerInsertedHTML(() => { const styles = styledComponentsStyleSheet.getStyleElement() styledComponentsStyleSheet.instance.clearTag() return styles }); if (typeof window !== 'undefined') return children; return ( <StyleSheetManager sheet={styledComponentsStyleSheet.instance} stylisPlugins={[rtlPlugin]} > {children} </StyleSheetManager> ) }
yarn build && yarn start or example bug git-repo
yarn build && yarn start
same styles in server and client
different styles in server and client
problem similar to emotion-2928
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
System:
Binaries:
npmPackages:
Reproduction
code like:
Steps to reproduce
yarn build && yarn start
or example bug git-repo
Expected Behavior
same styles in server and client
Actual Behavior
different styles in server and client
problem similar to emotion-2928
The text was updated successfully, but these errors were encountered: