使用以下示例:
https://github.com/zeit/next.js/tree/canary/examples/with-redux-wrapper
页面刷新后,调用getInitialProps并使用初始状态填充存储。但仅限于服务器端。当涉及到客户端时,store是空的,初始状态是传递一个属性。有没有办法用初始状态重新设置存储状态,或者我该怎么做?
发布于 2020-01-24 13:18:06
在此示例中,您应该使用redux persist
https://github.com/zeit/next.js/tree/canary/examples/with-redux-persist
https://stackoverflow.com/questions/59881172
复制相似问题