嗨,在我们的应用程序中,我们有一个 reducer 模式:
{
data: //here we have our actual data
fetching: // is it still fetching
intact: // has it been 'touched'
error: //errors if need be
}
此外,由于业务需求,我需要坚持一个 ReduxForm,它是它自己的蠕虫罐......
form: {
Foobar: {
values: {
},
initial: {
},
syncErrors: {
},
registeredFields: {
}
}
}
}
您可能已经发现,除了数据之外,持久化任何东西都是没有意义的,但是 Redux-Persist 会持久化整个 reducer。过滤和转换的例子有点……在我看来乏善可陈,我一直在努力实现。寻找一个例子