rematch-state-plugin
use
state
&setState
in rematch effects
Install
$ npm i -S rematch-state-plugin
API
const rematchStatePlugin =
add plugin entry
const store =
plugin create options
const state setState setStateAction = state: 'state' setState: 'setState' setStateAction: '__rematch_state_plugin_@@_set_state__'
this.state
& this.setState
in effects
use // models/count.js with this plugin enabled state: val: 1 effects: { this }
// models/count.js without this plugin enabled name: 'count' state: val: 1 { return ...state ...payload } effects: { const nsp = 'count' const val = rootStatensp this }
Changelog
License
the MIT License http://magicdawn.mit-license.org