文件名称:redux-socket:redux套接字请求-响应中间件
文件大小:4KB
文件格式:ZIP
更新时间:2024-05-17 16:02:01
JavaScript
Redux-socket 一个中间件,它允许您在客户端上触发套接字请求并调度一个响应操作。 对于它的服务器端副本,请查看 。 如果要触发redux-socket,请在操作中添加一个名为“ sock”的属性,如下所示: export function login ( username , password ) { return { sock : { path : 'login' , data : { username , password } , // the following are the actionCreators that get // fired when the server issues a response, success : authSuccess , failure : notify , } , } ; } 如
【文件预览】:
redux-socket-master
----.gitignore(14B)
----.babelrc(68B)
----package.json(706B)
----socketMiddlewareCreator.js(2KB)
----readme.md(2KB)
----makefile(50B)
----bin.js(3KB)