【文件属性】:
文件名称:redux-xstate:用于xstate的Redux中间件
文件大小:49KB
文件格式:ZIP
更新时间:2021-05-01 17:36:23
JavaScript
还原状态
用于Redux中间件
安装
$ npm install redux-xstate
用法
import { createMiddleware , createReducer } from 'redux-xstate'
const actionMap = {
log : ( dispatch , state ) => fetch ( LOG_URL , {
method : "POST" ,
body : JSON . stringify ( state )
} )
}
const stateChart = {
key : "light" ,
initial : "green" ,
states : {
green : {
on : {
TIMER : "yellow"
}
} ,
y
【文件预览】:
redux-xstate-master
----.gitignore(57B)
----.babelrc(88B)
----package.json(1KB)
----package-lock.json(232KB)
----src()
--------index.js(1KB)
----LICENSE(1KB)
----__tests__()
--------.eslintrc(35B)
--------main.spec.js(1KB)
----README.md(921B)
----.npmignore(44B)