Skip to content

Commit c22b603

Browse files
committed
Update README.md
1 parent 3c7af56 commit c22b603

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ renderToString(() => (
245245
const styles = renderSheets(styles);
246246
```
247247

248+
Alternatively, for automatic sheet rendering (assuming that you are server-rendering the entire document), you can do
249+
250+
```jsx
251+
renderToString(() => (
252+
<StyleRegistry auto>
253+
<App />
254+
</StyleRegistry>
255+
));
256+
```
257+
248258
## CSS Processing
249259

250260
`solid-styled` uses [LightningCSS](https://lightningcss.dev/) to preprocess CSS templates as well as apply CSS scoping and transformations. By default, [CSS Nesting and Custom Media Queries](https://lightningcss.dev/transpilation.html#draft-syntax) are enabled by default.

0 commit comments

Comments
 (0)