A basic boilerplate with the common configuration to build a robust application with react native.
- Clone repository.
git clone https://github.com/Guerrero25/react-native-boilerplate.git
- Install dependencies
cd react-native-boilerplate && npm install
- Run the project
react-native run-android
orreact-native run-ios
The project has the next structure
src/
components/
UI/
screens/
redux/
services/
types.ts
This folder is intended for all components that correspond to the application logic. As a recommendation, the components can be stored under the module to which they belong. e.g. src/components/auth/login
where auth
is the module and login
is the component of the login form.
Inside this folder is the UI/
folder. All the minimal and reusable components are supposed to be there. e.g. buttons, text components, titles, and so on.
This folder allows to have an overview of routes of the application. All the components here must not have any logic. They must be in charged of organizing the screen with the logic components from the components folder described above.
In this folder are all the redux store configuration.
All the modules to connect with external services should be in this folder. e.g. HTTP requests.
All the typescript types are supposed to be here.
This is not a perfect project so any recommendation, bug report or correction to improve either the structure or project configuration is welcome in the pull requests..