Socket
Socket
Sign inDemoInstall

react-style-singleton

Package Overview
Dependencies
34
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-style-singleton

Just create a single stylesheet...


Version published
Maintainers
1
Created

Readme

Source

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}'} />
)

FAQs

Last updated on 06 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc