This is a simple boilerplate for Reac Native app. For JavaScript and React former developers. It includes most of the necessary tools to create an app and test. Passing through props validation with PropTypes and styling with Style Components. All dependencies links are listed below. If you want to go foward and install more depencies like Redux or any other, check this guide before expo-guides. If you don't find anything, install dependencies with npm
or yarn
.
This boilerplate was created with expo-cli. In case you don't know, expo is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps from the same JavaScript/TypeScript codebase.
git clone https://github.com/hugoleonardodev/react-native-boilerplate-starter-edition
npm install
3. Run the app on the browser with expo web and install expo-cli
npm run web
If you don't have expo on your machine, this command will ask you to install expo globally. Just hit the Y key on the keyboard.
npm test <file.name>
npm run test-coverage
Check "script" section on package.json for more details.
src/
├─ components/
│ ├─ Button.js
│ ├─ Button.style.js
│ └─ Button.test.js
├─ screens/
│ ├─ HomeScreen.js
│ ├─ HomeScreen.style.js
│ └─ HomeScreen.test.js
│ ├─ DetailsScreen.js
│ ├─ DetailsScreen.style.js
│ └─ DetailsScreen.test.js
...
- expo
- react-native
- react-navigation
- react-test-renderer
- jest
- react-native-testing-library
- prop-types
- styled-components
- eslint
- babel
Happy coding!
😎