react-document-style
We could render style component either client or server side via react-side-effect
.
- UMD unpak
Usage
The Component writing like here.
const css = 'body { color: red; }' <Style css=css> <div> Hi <Style css='div { color: blue; }'/> </div> </Style>
- Client
Would create a style DOM inhead
- Server
Callrewind
orpeek
to get the css string on server side after render component.
please see the doc about react-side-effect for more information
ReactServerDOMStyle // div { color: blue; }Style // div { color: blue; }Style // undefined