-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: new extension vike-react-styled-jsx
#158
Conversation
👍 Yea it's nice we if can have at least one setting (even if it isn't that useful), so that we can follow the |
This reverts commit 841e6cb.
Left some comments, LGTM otherwise! |
LGTM, shall we squash & merge it now ? |
Co-authored-by: Rom <[email protected]>
|
||
The `vike-react-styled-jsx` extension automatically integrates `styled-jsx`'s SSR features under the hood to avoid FOUC. It does this by collecting the page's styles during SSR and injecting them earlier, ensuring that the styles are applied before hydration begins. Learn more in the [styled-jsx README > Server Side Rendering](https://github.com/vercel/styled-jsx#server-side-rendering). | ||
|
||
To learn more about how the integration works, have a look at the source code which is small. For full control [consider ejecting](https://vike.dev/eject). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid the "learn more" repetition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about explore
? a3cde20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more details...
(which is small)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay d6e15b5
|
||
<br/> | ||
|
||
Integrates [styled-jsx](https://github.com/vercel/styled-jsx) to your [`vike-react`](https://vike.dev/vike-react) app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be before the TOC. Intervention++
Extension++ 🚀 💫 Thank you @phonzammi ! Let's try to minimize Extensions are part of Vike's window shop 🪟 thus their readme need to be polished. |
I'm really glad, thank you for your help with the readme. Honestly, it's hard for me to find the right words. I'll try to minimize |
I know, it takes a while to get good at it (I still ain't). Looking forward to it. In the meanitme, let's update the Vike doc. |
Hi Rom, here it is – the new extension
vike-react-styled-jsx
.Here, we don't use
+onBeforeRenderHtml
like we did invike-react-antd
andvike-react-styled-components
. Instead, we definepageContext.config.styledJsx
directly inside+Wrapper
. Do you think it's okay?I couldn’t find any configuration related to StyledRegistry Server-Side Rendering, except for CSP. Should we add it?
Please have a look and review the PR.