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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    3
  • 0.0.1
    2

Package Sidebar

Install

npm i react-look-server-rendering

Weekly Downloads

5

Version

0.0.2

License

SEE LICENSE IN LICENSE

Last publish

Collaborators

  • dustin-h