阅读背景:

React Native: HeadslessJS和Redux——如何从任务访问store

来源:互联网 

We have a ReactNative app that uses redux, redux-persist and a HeadlessJS task. This task needs to have access to the store. As the task fires without booting the entire app (and so has no access by default), we thought we could simply create the store inside the task as well so that it would be rehydrated by redux-persist. It turns out, however, that the store created in this way is different from the one in the app: after running, they contain different values. We tested this in several ways and it seems indeed a problem with the stores (and not with the actions for instance) How should we access a Redux store from an HeadlessJS task?We have a ReactNative app that uses redux, redu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: