Skip to content

πŸ”Έ Best Folder Structure For Every React Native Project ... πŸ”Έ In This Repo We Are Demonstrate How To Structure And Manage Your React Native Project ...

License

Notifications You must be signed in to change notification settings

SuryaKarmakar/ReactNative-ProjectStructure

Repository files navigation

React Native Project Folder And File Structure

Basic Folder Structure :

β”œβ”€β”€ src
β”‚   β”œβ”€β”€ api
β”‚   β”œβ”€β”€ assets
β”‚   β”‚  β”œβ”€β”€ fonts
β”‚   β”‚  β”œβ”€β”€ images
β”‚   β”œβ”€β”€ components
β”‚   β”‚  β”œβ”€β”€ common
β”‚   β”‚  β”œβ”€β”€ presentation
β”‚   β”œβ”€β”€ constants
β”‚   β”œβ”€β”€ hooks
β”‚   β”œβ”€β”€ navigation
β”‚   β”œβ”€β”€ redux
β”‚   β”‚  β”œβ”€β”€ actions
β”‚   β”‚  β”œβ”€β”€ constants
β”‚   β”‚  β”œβ”€β”€ reducers
β”‚   β”œβ”€β”€ screens
β”‚   β”‚  β”œβ”€β”€ homeScreen
β”‚   β”‚  β”œβ”€β”€ aboutScreen
β”‚   β”œβ”€β”€ styles
β”‚   β”œβ”€β”€ utility

Folder With File Structure :

β”œβ”€β”€ src
β”‚   β”œβ”€β”€ api
β”‚   β”‚  β”œβ”€β”€ ApiCalls.js
β”‚   β”‚  β”œβ”€β”€ EndUrls.js
β”‚   β”‚  β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ assets
β”‚   β”‚  β”œβ”€β”€ fonts
β”‚   β”‚  β”‚  β”œβ”€β”€ font-name1.ttf
β”‚   β”‚  β”‚  β”œβ”€β”€ font-name2.ttf
β”‚   β”‚  β”œβ”€β”€ images
β”‚   β”‚  β”‚  β”œβ”€β”€ icon1.png
β”‚   β”‚  β”‚  β”œβ”€β”€ icon2.png
β”‚   β”œβ”€β”€ components
β”‚   β”‚  β”œβ”€β”€ common
β”‚   β”‚  β”‚  β”œβ”€β”€ customButtonRN
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”‚  β”‚  β”œβ”€β”€ customTextRN
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”‚  β”œβ”€β”€ presentation
β”‚   β”‚  β”‚  β”œβ”€β”€ buttonRN
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”‚  β”‚  β”œβ”€β”€ textRN
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”œβ”€β”€ constants
β”‚   β”‚  β”‚  β”œβ”€β”€ Enums.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Fonts.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Images.js
β”‚   β”‚  β”‚  β”œβ”€β”€ ScreenNames.js
β”‚   β”‚  β”‚  β”œβ”€β”€ StorageKeys.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Strings.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Colors.js
β”‚   β”œβ”€β”€ hooks
β”‚   β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ navigation
β”‚   β”‚  β”‚  β”œβ”€β”€ AppNavigator.js
β”‚   β”‚  β”‚  β”œβ”€β”€ AuthNavigator.js
β”‚   β”‚  β”‚  β”œβ”€β”€ TabNavigator.js
β”‚   β”œβ”€β”€ redux
β”‚   β”‚  β”œβ”€β”€ actions
β”‚   β”‚  β”‚  β”œβ”€β”€ Action1.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Action2.js
β”‚   β”‚  β”œβ”€β”€ constants
β”‚   β”‚  β”‚  β”œβ”€β”€ Constants1.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Constants1.js
β”‚   β”‚  β”œβ”€β”€ reducers
β”‚   β”‚  β”‚  β”œβ”€β”€ Reducer1.js
β”‚   β”‚  β”‚  β”œβ”€β”€ Reducer2.js
β”‚   β”‚  β”œβ”€β”€ store.js
β”‚   β”œβ”€β”€ screens
β”‚   β”‚  β”œβ”€β”€ homeScreen
β”‚   β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”‚  β”œβ”€β”€ aboutScreen
β”‚   β”‚  β”‚  β”œβ”€β”€ index.js
β”‚   β”‚  β”‚  β”œβ”€β”€ styles.js
β”‚   β”œβ”€β”€ styles
β”‚   β”‚  β”œβ”€β”€ GlobalStyle.js
β”‚   β”œβ”€β”€ utility
β”‚   β”‚  β”œβ”€β”€ index.js

api/

This folder contains logic related to external API communications.

assets/

This folder will store all the assets that we are using in react-native. You can add static files like fonts and images to it. Also, you can add more assets like videos in this folder according to your project requirements.

  • fonts/
  • images/

components/

In this folder, we create all the React components that will be part of our app and any custom component that we create during the app’s development. We can group components by features or places they will be used and components that will be used throughout our app, like buttons or texts.

  • common/
  • presentation/

constants/

This folder contains all the string related file.

hooks/

If you have custom hooks defined in your project you can put it over here that can be shared across your entire project.

navigation/

Your project base navigation goes here. You can create a stack navigator in it and export it to your application.

redux/

This folder holds all the redux files if you are using react-redux for managing state. Inside redux folder you have actions, reducers, store which can easily manage your redux files.

  • actions/
  • constants/
  • reducers/

screens/

If you have multiple screens like auth screens: login, register and profile screens, product screens it can be saved here.

styles/

If you have global styles defined in your project you can put it over here like colors, font styles like things.

utility/

All the utils/helpers files go here that storing reusable methods and logic like validations, progress bar, date pickers, and according to your app requirements.

About

πŸ”Έ Best Folder Structure For Every React Native Project ... πŸ”Έ In This Repo We Are Demonstrate How To Structure And Manage Your React Native Project ...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published