downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
node>=10
esmcjstypes
keywords
Tagged topics.
reactstylecss
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
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 />);
}MIT
Estimated unpacked size across 3 packages.
114.0 kB
Includes dependencies.
^1.0.0
1.0.1