Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-style-side-effect

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-style-side-effect

React Style Side Effect =========================

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Style Side Effect

npm

Declaritvely style elements that exist outside of the React tree. Works great with css-in-js libraries such as:

  • aphrodite

Installation

npm install --save react-style-side-effect

Basic Usage

import React from 'react'
import createStyleSideEffect from 'react-style-side-effect'

const HtmlStyle = createStyleSideEffect(document.docElement)
const BodyStyle = createStyleSideEffect(document.body)
const RootStyle = createStyleSideEffect(document.getElementById('root'))

export default function MyApp() {
  return (
    <HtmlStyle className='htmlClass'>
      <BodyStyle className='bodyClass'>
        <RootStyle className='rootClass'>
          ...
        </RootStyle>
      </BodyStyle>
    </HtmlStyle>
  )
}

FAQs

Package last updated on 22 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc