Just create a single stylesheet...
$ npm install react-style-singleton
300b with all dependencies, minified and gzipped
Creates a style component with internal tracker.
import {styleSingleton} from 'react-style-singleton'
const Style = styleSingleton();
export const App = () => (
<Style styles={'body {color:red}'} />
);
import {styleHookSingleton} from 'react-style-singleton';
const useStyle = styleHookSingleton();
const useAnotherStyle = styleHookSingleton();
export const App = () => {
useStyle('div {color:red}');
useAnotherStyle('body { background-color:red }');
return (<div />);
}
© 2010 - cnpmjs.org x YWFE | Home | YWFE