【问题标题】:Redux reducer does not change next state storeRedux reducer 不会改变下一个状态存储
【发布时间】:2016-09-27 15:10:31
【问题描述】:

这是我在 redux-react 中的小聊天应用 我对减速器有疑问,它不会改变下一个状态存储

https://github.com/arammkr/chat-redux/blob/master/src/reducers/user.js#L23

https://www.dropbox.com/s/5rnqx4jnaho0lbj/Screenshot%202016-05-30%2000.25.17.png?dl=0

这是控制台日志,您可以在其中看到操作有用户数组,但下一个状态用户数组为空。

【问题讨论】:

    标签: reactjs redux react-redux


    【解决方案1】:

    看来您需要开启action.type,而不是action

    【讨论】:

    • 酷。在那种情况下,还不如接受答案:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-26
    • 2018-08-09
    • 2023-03-23
    • 2019-02-24
    • 2019-01-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多