JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12357136
  • Score
    100M100P100Q213903F
  • License MIT

Just create a single stylesheet...

Package Exports

  • react-style-singleton

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-style-singleton) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-style-singleton

0.5kb With all dependencies, minified and gzipped

Creates a style component with internal tracker.

  • Adds styles to the browser on the first instance mount.
  • Removes after last instance unmount.

Thus - useful for a libraries, which want to bring some styles within, and cleanup after.

API

import {styleSinglentone} from 'react-style-singleton'

const Style = styleSinglentone();

() => (
  <Style styles={'body {color:red}'} />
)