/ live.thehmm.nl / back / node_modules / react-style-singleton /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/2 years ago -  
[   ]package.json2 years ago3.2K 
[TXT]README.md40 years ago851 d7c1522 post receive test [كارل مبارك]
README.md

react-style-singleton

300b with all dependencies, minified and gzipped

Creates a style component with internal tracker.

API

Component

import {styleSingleton} from 'react-style-singleton'

const Style = styleSingleton();

export const App = () => (
  <Style styles={'body {color:red}'} />
);

Hook

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 />);
}
Apache/2.4.38 (Debian) Server at www.karls.computer Port 80