GithubHelp home page GithubHelp logo

cuitymiko / react-native-dva-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nihgwu/react-native-dva-starter

0.0 1.0 0.0 356 KB

a React Native starter powered by dva and react-navigation

JavaScript 64.70% Python 8.66% Java 7.07% Objective-C 19.58%

react-native-dva-starter's Introduction

react-native-dva-starter

A React Native starter powered by dva and react-navigation

Start

npm install dva-native-cli -g
dvanative git app
cd app
react-native run-ios # or react-native run-android

Great thanks to @xuan45 for his cli tool dva-native-cli, check that project for more information.

Advance

The builtin router of dva (not react-router v4), doesn't support React Native, we have to integrate other router components, such as Navigator, ExperimentalNavigation, react-native-router-flux and react-navigation. Since the former two will be depreciated in flavor of react-navigation, which is also be recommended by official, so I choose it to be the navigator.

In this starter, I provide a router model to control the default action flow of react-navigation to workaround a known issue. If you don't need this, the integration will be much simpler, you can simply remove the router model and pass routerReducer to extraReducer of dva extraReducers: { router: routerReducer }. Read Redux Integration and dva's API for more information.

Also there is another workaround for a missing feature react-navigation/react-navigation#232, so I use two StackNavigators to contain the screens with different transition animations, you can create you own transition animations via transitionConfig, see react-navigation/react-navigation#99

LICENSE

MIT

react-native-dva-starter's People

Contributors

flasco avatar nihgwu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.