This project is a clean and minimalist React Native boilerplate that can be used to kickstart a mobile application.
Make sure you have react-native-cli setup before trying to run the project.
- TypeScript support out of the box
- State management with MobX
- React Navigation to handle navigation in the app
- Async storage from react-native-community
- SVG support with react-native-svg
- prettier and eslint preconfigured for React Native
- Husky to prevent bad commits
- Simplified non-absolute imports inside the
src
directory using babel-plugin-module-resolver - react-native-rename to rename apps with just one command
To create a new project using the boilerplate:
- clone this repository
- remove the previous git history:
rm -rf .git/
- install the npm dependencies by running
npm install
- rename the React Native project to your own project name:
npm run rename -- <YourProjectName>
(the default name isreact_native_boilerplate
) - remove the LICENSE file and the "License" section from the README if your project is not open source
Feel free to remove the section "Using the boilerplate" from the README (you will not need it anymore in your project). You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory.
You can now create a new git repository for your project (using git init
) and create the first commit.
Assuming you have all the requirements installed, you can setup and run the project by running:
npm install
to install the dependenciesnpm start
to start the metro bundler, in a dedicated terminalnpm run android
to run the Android application (remember to start a simulator or connect an Android phone)npm run ios
to run the iOS application (remember to start a simulator or connect an iPhone)
If your application fails to start after using the npm run rename
command, please take a look at this issue
Contributions are very welcome.
This project is MIT licensed.