dva 应用在react-native 是否可行,是否稳定,有项目案例么?
现在用dva 应用在 react-native 是否成熟
不看 README 的吗?
我看了,能跑起来;dva是将react-saga的封装,到底用dva对react-native 稳定么,还是采用react-saga好呢?给个建议?
可以的,一样健壮、稳定
subscriptions: {
setup({ dispatch }) {
console.log('dispatch homw')
dispatch({
type: 'getList',
payload: {}
});
// history.listen(location => {
// if (location.pathname === '/ProductPlan') {
// dispatch({
// type: 'query',
// payload: {}
// });
// }
// });
},
},
我在model 中如何判断路由呢,不然每次model都会请求数据
我在用dva 开发 react-native 的时候,如何 在订阅的时候通过路由,来更新不同的数据;
dva 用于 react-native 不支持 router 功能,如果订阅路由?
那是不是 我们在订阅数据的时候如何过滤dispatch 方法呢,总不能每次都要取一下数据
RN 里react-navigation如何使用subscriptions
Most helpful comment
RN 里react-navigation如何使用subscriptions