-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
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
Support for concurrent rendering + server components #497
Comments
Would love to add support for this. Would be really huge. |
Any plan on this one? I'm willing to help. |
Meanwhile, can we use https://nextjs.org/docs/app/building-your-application/styling/css-in-js#configuring-css-in-js-in-app |
hey @AlexandruRoman any help is greatly appreciated! That's interesting approach. I think it should work with |
@cristianbote I'll give it a try for sure! |
Since there's not much activity here. Some frameworks are already recommending streaming SSR and async SSR and libraries like Goober, which has a single, global state for containg sheets, doesn't work well in this environment. Vue calls this the Cross-request state pollution. My proposal here is for Goober to have virtual sheets, something along the lines of: const sheets = createGooberSheet();
// Usage
<GooberRegistry sheets={sheets}>
<App />
</GooberRegistry>
// SSR, can be anytime in the future, be it immediate or async
const css = renderSheets(sheets); Some CSS-in-JS libraries has this and I believe it definitely works as a solution. I really like Goober (because of the size and speed), but the lack of concurrency is the only thing that's holding me back from using it. |
If Goober is going to remain relevant in the new RSC landscape, it needs to handle concurrent rendering. I'd also love to see this fully resolved so we can continue using Goober. |
hehe! Thanks for the trigger 😅 As I said up here, I am super open to external or any kind of contributions 😬. Adding this sounds like a major version bump so the change in API contract would be warranted. |
https://beta.nextjs.org/docs/styling/css-in-js
https://react.dev/blog/2022/03/29/react-v18#what-is-concurrent-react
reactwg/react-18#70
https://react.dev/blog/2022/03/08/react-18-upgrade-guide#new-apis-for-libraries
reactwg/react-18#110
The text was updated successfully, but these errors were encountered: