Best way to structure any react-native application.
- Just Press (command/ctrl+Shift+p).
- Type "generate boilerplate".
- A select your desire boilerplate.
It will generate basic structure for your react-native project as following.
-app
-res
-fonts (put all your fonts files in this folder)
-images (put all your images in this folder)
-fonts.js
-images.js
-colors.js
-dimensions.js
-src
-scenes (put all your screen in this folder)
-components (put all your components in this folder)
-R.js
-Routes.js (put your navigation here)
This file will generate index.js file in component folder, so it will be easy to access all your component in screens. Just import them from ./components
This file will generate index.js file in scenes folder, so it will be easy to access all your screens in navigation. just import them from ./scenes
This will populate your images.js file in res folder
This will populate your fonts.js file in res folder
It will generate structure for your react-native project with redux as following.
-app
-src
-redux
-actions
-actiontypes.js
-(put your all action here)
-reducers
-rootreducer.js (combine reducer)
-(put your all reducers here)
-store.js
-middleware.js
In Future!
-
Add boilerplate for ContextAPI/Hooks
-
Add more project structures
None. If you find something, please report it by opening new issue.
This extension was inspired by:
Logo icon is React icon by Icons8