Aminadav / react-use-stylehseet-hook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-use-stylesheet-hook

Install:

npm i react-use-stylesheet-hook

Example:

import useStylesheet from 'react-use-stylesheet-hook'
function MyComponenet(){
  useStyleSheet('body {background-color:red;}')
}

Everytime the component will be mounted the body background will be changed to red. On unmount the color will be back to normal.

About

License:MIT License


Languages

Language:JavaScript 100.0%