React Easy State v6.1: Minimalistic state management with hooks support (dev.to) 1 points by miklosbertalan 7y ago ↗ HN
[–] miklosbertalan 7y ago ↗ ReactJS Easy State (https://github.com/solkimicreb/react-easy-state) is a practical state management library with two functions and two accompanying rules.1. Always wrap your components with view().2. Always wrap your state store objects with store(). import React from 'react' import { store, view } from 'react-easy-state' const counter = store({ num: 0, incr: () => counter.num++ }) export default view(() => <button onClick={counter.incr}>{counter.num}</button>) ---This release adds support for the upcoming React hooks.
1 comment
[ 2.7 ms ] story [ 9.2 ms ] thread1. Always wrap your components with view().
2. Always wrap your state store objects with store().
---This release adds support for the upcoming React hooks.