我正在使用本教程https://medium.com/@jrcreencia/persisting-redux-state-to-local-storage-f81eb0b90e7e因为我需要将按钮的状态保存到本地存储中。我按照步骤1:1进行操作,但最终我遇到了这个问题:
也许第一次运行应用程序时,persistedState为null。尝试使用persistedState
persistedState
persistedState || {}