Skip to content

Instantly share code, notes, and snippets.

@suryapratap1
Created April 26, 2019 11:23
Show Gist options
  • Save suryapratap1/e157a90991f61789edcdd7704001fb5f to your computer and use it in GitHub Desktop.
Save suryapratap1/e157a90991f61789edcdd7704001fb5f to your computer and use it in GitHub Desktop.
REACT NATIVE BASE STRUCTURE
====REACT NATIVE BASE STRUCTURE
• To run the code by terminal
• Change the directory- cd project path
• npm install
• To run – react-native run-ios/android
• Change App Name
• Delete android and ios folder
• Change the name and displayName in the app.json as per your App name
• Run command react-native-eject
• File descriptions
• action folder used for defining action and their action type
• reducer folder used for defining reducers as per action
• store.js- user for storing all the state of the app
• index.js – Registration of app
• App.js - Entry point of App
• Router.js- routing of all the screens
• common/activityIndicator.js – common loader(progress bar) for all the screens
• common/colors.js - common colors
• common/Constants.js- font size
• common/Header.js- common header for all the screens
• common/Icons.js- all the images import in single file
• common/Language.js- used for multilingual
• common/styles.js- used for common css which is used in all the screens
• common/validations.js- Used for name, email, username and password validations
• pages folder used for screen design and controller
• app.json - used for App name display name
• assets/icons is the directory of all the images
• utils/Api.js – common method for hit the GET and POST request and return the response
• utils/responsive- used for managing UI for all the screens
• utils/utils.js - used for check the internet connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment