Skip to content

React Native Project Layout

David Wisner edited this page Jul 17, 2018 · 4 revisions

All project code exists in the src folder. The app uses a redux layout:

  • App.js
    • Initializes react-native w/ Redux and React-Navigation
  • AppRoutes.js
    • This is a central part of the application
    • Currently contains two nav stacks: App and Onboarding
  • AppBootstrap
    • This is where we initialize the app with content stored locally / api
  • Reducer
    • contains the state of the app. initializing and updating the app state happens here
  • Store
    • initializes middleware for the redux store
  • Components
    • react components, most of the UI styles and functionality is contained here
    • components are exported with react-redux connect function to map state and dispatch
  • Actions
    • Actions contain much of the logic of the application, API handling will happen here, constants are used for updating the reducer