React Style Singleton
react-style-singleton
Just create a single stylesheet...
Utilities
react
style
css
react-style-singleton
Utilities
javascript
npm
frontend
open source
ui
Stars
18
Weekly
0
Open issues
3
Bundle
~60 kB
Installation
npm install react-style-singletonCode example
import { useStyleSingleton } from "react-style-singleton";
export function Example() {
const value = useStyleSingleton();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Anton Korzunov
- 0 weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~60 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 3 open issues on GitHub