0.1.2 ā€¢ Published 5 years ago

react-shinju v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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);