react-shinju
Version:
Ultra Lightweight React State Management with Shinju
25 lines (16 loc) ⢠469 B
Markdown
with Shinju_
š[Go Here](https://github.com/rajatsharma305/shinju)
```js
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);
```
_Ultra Lightweight React State Management