Skip to content

(Expo) React Native Template configured with typescript, eslint, prettier, husky (pre-commit), jest, testing-library, nativewind and more...

Notifications You must be signed in to change notification settings

Aleydon/React-Native-Template

Repository files navigation

🌎 React Native Template (Expo) 🌎




📌 Requirements: 📌

NodeJs: 🔗 https://nodejs.org/en/
Expo: 🔗 https://docs.expo.dev/


Template configuration:


Relative Paths Config:

  "baseUrl": "."
    "paths": {
      "@components/*": ["src/components/*"],
      "@constants/*": ["src/constants/*"],
      "@utils/*": ["src/utils/*"],
      "@hooks/*": ["src/hooks/*"],
      "@assets/*": ["src/assets/*"],
      "@services/*": ["src/services/*"],
      "@context/*": ["src/context/*"]
    }

▶️ Get Started:

  1. Clone this repo
git clone https://github.com/Aleydon/React-Native-Template.git
  1. Install NPM packages
npm install or yarn
  1. Run this project
npm run start or yarn start

In the output, you'll find options to open the app in a

You can start developing by editing the files inside the app directory. This project uses file-based routing.

Tests:

  • 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();
  });
});

Test Running:


Image test running

Releases

No releases published

Packages

No packages published