Comments (2)
Thanks, I will update the code in my project 👍🏻
I will watch for an update to makeStaticStyles()
.
This issue can be closed.
from griffel.
@Yukioru thanks for the interest and reporting 👍 There are two separate issues actually...
Proper configuration
We perform rehydration on the client, it's done in RendererProvider
:
griffel/packages/react/src/RendererContext.tsx
Lines 36 to 38 in 0a94e83
The difference is in configuration, I updated your CodeSandbox (https://codesandbox.io/s/next-griffel-ssr-forked-2zok5q). In short the same instance of renderer
should be used, for this RendererProvider
should be moved to App
:
// @document.jsx
originalRenderPage({
enhanceApp: (App) => {
return function EnhancedApp(props) {
return (
- <RendererProvider renderer={renderer}>
- <App {...props} />
+ <App {...props} renderer={renderer} />
- </RendererProvider>
);
};
}
});
// @app.jsx
-function App({ Component, pageProps }) {
+function App({ Component, pageProps, renderer }) {
return (
+ <RendererProvider renderer={renderer || createDOMRenderer()}>
Before
After
makeStaticStyles()
does not support hydration
This was not implemented yet, but should... 🐱 I created a separate #44 to track this.
from griffel.
Related Issues (20)
- How to add multiple classes with condition HOT 1
- When running with a jest test which uses container queries through griffel, the error is thrown from the test HOT 2
- bug(core): Animation types have errors when animating CSS custom properties HOT 2
- webpack-extraction-plugin: support for code split CSS HOT 1
- lint: support stylelint? HOT 2
- How to combine class strings + griffel atomic classes HOT 5
- core: Selector `>` and `> ` should generate same class name
- multiple @container rules ignored (only last rule is applied) HOT 1
- core: support removing property from existing set of styles
- docs: makeStaticStyles doesn't mention it returns a React hook HOT 2
- Microsoft Learn Video Issue: Simplified Chinese and Traditional Chinese subtitles are reversed HOT 1
- bug: mergeClasses order of arguments not working as expected when used with Webpack Extraction plugin HOT 5
- devtools: provide headless mode
- feature: add support for adding prefix to CSS to scope down the styling HOT 1
- Why do class definitions get broken up into single-rule classes? HOT 1
- bug(core): missing vendor prefix (webkit) for background-clip: text HOT 1
- feature: add prefixing for backdrop-filter
- lint: Fail the build/lint when an invalid CSS rule is found
- webpack-loader crashes with inputSourceMap error when used after babel-loader
- core: shorthands.gridArea() does not expand custom idents properly HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from griffel.