我如何集成 redux store 来响应原生? [英] how can i integrate redux store to react native?

查看:51
本文介绍了我如何集成 redux store 来响应原生?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 react native 和 Navigation React Navigation V2 创建了基本的 ui我的应用程序的入口文件(App.js)像这样

I have created basic ui with react native and Navigation React Navigation V2 My App's entry file(App.js) like this

//App.js

const App = createSwitchNavigator(
  {
    StartupScreen: Validator, //validating accesstoken existing or not if existing navigate to Dashboard otherwise login page 
    Login:Login, 
    DashBoard: Dashboard //tabbed view
  },  
  {
    initialRouteName: 'StartupScreen',
  }
);

export default App

这里如何与 redux 集成?

how can integrate here with redux?

这就是我如何将商店传递给应用程序

that is how can I pass store to app like

<Provider store={store}> <App /></Provider>

获取存储每个页面.

提前致谢

推荐答案

我已经在我的模板中实现了 Redux.你可以参考这个 https://github.com/vishaljadav24/react-native-base-模板

I have implemented Redux in My template. You can refer this https://github.com/vishaljadav24/react-native-base-template

这篇关于我如何集成 redux store 来响应原生?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆