有个前后端分离的运维开发web平台, 后端会间隔5分钟同步一次数据,现在需要将最新一次同步的时间推送到web前端。
// reducer.js const intialState = { name: "reactgo", allNames: []} const reducer = (state = intialState 如果现在打开浏览器,您会看到“ reactgo”显示在该input字段内。 改变Redux状态 redux状态树是只读的,我们不能直接改变状态。 reducer.js const intialState = { name: "reactgo", allNames: []} const reducer = (state = intialState reducer.js使用以下代码更新文件: // reducer.js const intialState = { name: "reactgo", allNames: [], error: "" } /actions/actionTypes' const intialState = { name: "reactgo", allNames: [], error: "" } const reducer