Reason/BuckleScript bindings for styletron-react. See also bs-styletron-react-examples.
From Styletron documentation:
Styletron is a universal CSS-in-JS engine built from the ground up for high-performance. Features include:
- Dynamic generation of inlineable critical stylesheets with minimum possible
size and parse times
- Automatic generation of maximally compressed "atomic" critical CSS via declaration-level deduplication
- Automatic declaration-level dead CSS elimination - only actually used declarations get included in output
- Native media query and pseudo selector support for full critical CSS without JavaScript
- Hyper-granular memoization to avoid making unnecessary modifications to stylesheet
- Fast cache hydration of server-rendered styles to prevent re-rendering of server-rendered styles
- Use of
CSSStyleSheet
rule injection ensuring only new styles get parsed
yarn install
yarn build
Run:
yarn add --dev @astrada/bs-styletron-react
to add the library to your project dependencies. And add
@astrada/bs-styletron-react
to dependencies
node of your bsconfig.json
.