A model lib for Reactant
npm install reactant-model
# or
yarn add reactant-model
import { model } from 'reactant-model';
const counter = model({
state: {
count: 0,
},
actions: {
increase: (num) => (state) => {
state.count += num;
},
}
});
You can visit reactant.js.org for more documentation.