NodeJs: 🔗 https://nodejs.org/en/
Expo: 🔗 https://docs.expo.dev/
- Jest + React Native Testing Library for automated testing. 🔗 https://jestjs.io/ + https://callstack.github.io/react-native-testing-library/.
- Eslint + Prettier for code standardization and formatting. 🔗 https://eslint.org/ + https://prettier.io/.
- Typescript for typing. 🔗 https://www.typescriptlang.org/
- Nativewind for styling components. 🔗 https://www.nativewind.dev/getting-started/expo-router.
- HuskyJs for automatically lint your commit messages, code, and run tests upon committing or pushing. 🔗 https://typicode.github.io/husky/
"baseUrl": "."
"paths": {
"@components/*": ["src/components/*"],
"@constants/*": ["src/constants/*"],
"@utils/*": ["src/utils/*"],
"@hooks/*": ["src/hooks/*"],
"@assets/*": ["src/assets/*"],
"@services/*": ["src/services/*"],
"@context/*": ["src/context/*"]
}
- Clone this repo
git clone https://github.com/Aleydon/React-Native-Template.git
- Install NPM packages
npm install or yarn
- Run this project
npm run start or yarn start
In the output, you'll find options to open the app in a
- development build
- Android emulator
- iOS simulator
- Expo Go, a limited sandbox for trying out app development with Expo
You can start developing by editing the files inside the app directory. This project uses file-based routing.
- How to run tests:
npm run test or npm run test:watch
It has an example of tests with Jest + React-Native-Testing-Library in app/tests/home.spec.tsx
import { render } from '@testing-library/react-native';
import Home from 'src/app/(tabs)';
describe('Home Test', () => {
it('should render Home', () => {
const homeComponent = render(<Home />);
expect(homeComponent).toBeDefined();
});
it('should get text on screen', () => {
const { getByText } = render(<Home />);
const text = getByText('React Native Template');
expect(text).toBeDefined();
});
});