Skip to content

hugoleonardodev/react-native-boilerplate-starter-edition

Repository files navigation

Welcome to React Native Boilerplate Starter Edition

A boilerplate to code a native App with tests and navigation

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.

Before start

1. Clone this repository to your local machine

git clone https://github.com/hugoleonardodev/react-native-boilerplate-starter-edition

2. Install dependencies

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.

4. Testing a file

npm test <file.name>

5. Test coverage

npm run test-coverage

Check "script" section on package.json for more details.

7. File system structure

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
...

7. References

Happy coding!

😎