react-look-server-rendering

    0.0.2 • Public • Published

    react-look-server-rendering

    React-Look extension to render styles optimized on the server

    Renders all needed styles after rendering react and resets it's cache. You can also reset manually.

    react-look is a peer-dependency!

    Installation

    npm install react-look-server-rendering --save
    

    Usage

    import { plugin, renderToString as lookRenderToString, reset } from 'react-look-server-rendering'
     
    // Add the plugin to your look-config
    serverConfig.plugins.push(plugin)
     
    // Get CSS string after each react.renderToString()
    let styles = lookRenderToString()
     
    // Optionally reset the cache by yourself
    reset()

    License

    MIT

    Install

    npm i react-look-server-rendering

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    SEE LICENSE IN LICENSE

    Last publish

    Collaborators

    • dustin-h