1.0.0 • Published 4 years ago

sheets-registry-transformer v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

sheets-registry-transformer

Example of using Material UI and React renderToNodeStream for rendering stylesheets on the server.

npm install sheets-registry-transformer

Assuming this is used with Material UI's Stylesheets() to wrap the server rendered component:

const sheetsRegistry = new ServerStyleSheets();
const app = sheetsRegistry.collect(component);
renderToNodeStream(app).pipe(sheetsRegistryTransformer(stylesheet));