react-shinju
v0.1.2
Published
Ultra Lightweight React State Management with Shinju
Downloads
7
Maintainers
Readme
React Shinju
Ultra Lightweight React State Management with Shinju
What is Shinju?
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);