Last active
November 15, 2017 12:36
-
-
Save MaraAlexa/377c521c6d6b92a51826afb9d37a8c4d to your computer and use it in GitHub Desktop.
start a React Native App with Redux
This file contains 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
// initiate a React Native App | |
react-native init ReactNativeReduxApp | |
// go to your app folder | |
cd ReactNativeReduxApp | |
// run the ios simulator | |
react-native run-ios | |
// add dependencies | |
yarn add redux redux-thunk react-redux | |
// create your folder structure | |
mkdir reducers | |
// create 2 files inside: a rootreducer and a reducer thats going to handle the data for the app (the people endpoint) | |
touch reducers/index.js reducers/people.js | |
// create the App.js file to hold the main app | |
// create a constants file to hold all the contants to be used across the actions and our reducer | |
// create an action file thats going to store the actions | |
// create the configure store to create my store and let me use it in the app | |
touch actions.js app.js configureStore.js constants.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment