renderToNodeList
This method returns a NodeList with
<style>
objects with the rendered CSS. This is useful for SSR (Server Side Rendering). This method uses the renderToSheetList internally.Arguments
Argument | Type | Description |
---|---|---|
renderer | Renderer | The renderer providing the styles which are rendered to a list of sheet data. |
Returns
(Object[]): NodeList of style sheet nodes
Imports
import { renderToNodeList } from 'react-fela'import { renderToNodeList } from 'preact-fela'import { renderToNodeList } from 'inferno-fela'
Example
import { renderToNodeList } from 'react-fela'import { createRenderer } from 'fela'const renderer = createRenderer()const Head = <head>{renderToNodeList(renderer)}</head>