-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support redux enhancer #258
Labels
Comments
目前不支持 redux 的 enhancer,所以用不了 redux-persist 。 |
有其他替代的解决方案吗? 比我我登录之后的用户信息 一刷新就没有了 |
const app = dva({
onStateChange() {
save(app._store.getState());
},
}); 试试这样,有点难看,后续会把 state 传给 onStateChange 。 |
save 需要你自己实现的。 |
save可以实现 state-> 持久化state , 那怎么持久化state-> state 如何去实现那 ?还是dva自动就同步了 |
const app = dva({
initialState: savedState,
}); |
好吧 先这么用吧 期待dva尽快支持持久化 |
我也是遇到同样问题,目前都是保存到本地,我试下sorrycc的 推荐的方式 |
This was referenced Nov 18, 2016
Closed
save也是要保存到本地吗? |
请问,如何有选择性的持久性store呢,比如我只想某几个state变化的时候,我才存储,这样存储的store,就不会太大@sorrycc |
@huangronggod 自己写存储策略 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我刷新页面的时候 state变成了初始值 请问dva有store持久化的机制吗 类似于redux-persisit这种
The text was updated successfully, but these errors were encountered: