Created
March 19, 2017 22:53
-
-
Save sirdlx/039cf28a7ea49c4b691f69a6ab380997 to your computer and use it in GitHub Desktop.
Alternative to react-navigation's replace action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View | |
} from 'react-native'; | |
import setup from './src/screens/setup' | |
AppRegistry.registerComponent('splash_app', () => setup); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react' | |
import {Provider} from 'react-redux' | |
import Navigator from './navigator' | |
import { | |
createStore, | |
applyMiddleware, | |
combineReducers | |
} from 'redux' | |
import thunk from 'redux-thunk' | |
import rootReducer from '../reducers' | |
const store = createStore(rootReducer, undefined, applyMiddleware(thunk)) | |
class setup extends Component { | |
render() { | |
return ( | |
<Provider store={store}> | |
<Navigator/> | |
</Provider> | |
) | |
} | |
} | |
export default setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment