react-shinju

0.1.2 • Public • Published

React Shinju

Ultra Lightweight React State Management with Shinju

What is Shinju?

👉Go Here

Usage

import StateTree from '@higherorder/shinju';
import { subscribeComponent } from 'react-shinju';
 
const State = StateTree();
 
const Counter = ({ state }) => (
  <div onClick={_ => State.add((state.counter || 0) + 1, 'counter')}>
    {state.counter}
  </div>
);
 
subscribeComponent(State)(Counter);

Package Sidebar

Install

npm i react-shinju

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

6.73 kB

Total Files

13

Last publish

Collaborators

  • rajatsharma