Skip to content

Latest commit

 

History

History
118 lines (90 loc) · 3.39 KB

File metadata and controls

118 lines (90 loc) · 3.39 KB

🥡 React Native template

Modern React Native JS template featuring most popular libraries.

react-native redux-toolkit react-navigation eslint react-native-bootsplash

🚀 Usage

Ensure you have all React Native dependencies installed.

npx react-native init MyApp --template https://github.com/ltatarev/react-native-template.git

Note: Current template works with React Native 0.82.1.

Installation

After cloning or creating your app from this template, run the following commands to set up your environment:

corepack enable
yarn
bundle install

To install iOS pods, use the script provided in package.json:

yarn install-pods

This ensures all dependencies are installed correctly for both JS and native code.

🕵️‍♀️ Libraries included

🗂 Module structure

📦 module
┣ 📂 assets
┣ 📂 components
┣ 📂 fragments
┣ 📂 hooks
┣ 📂 redux
┃ ┣ 📜 actions.js
┃ ┣ 📜 index.js
┃ ┣ 📜 slices.js
┃ ┣ 📜 selectors.js
┃ ┗ 📜 reducers.js
┣ 📂 screens
┣ 📂 services
┣ 📜 const.js
┣ 📜 index.js
┗ 📜 navigator.js

Each folder has an index.js which exports folder contents that are required by other modules. Named exporting is prefered for components, and namespace export for services.

🗂 Setting up new project

This template was made because I realized that I am bootstrapping every new React Native project equally, so I decided to put all boilerplate I often use into one place. Common steps I usually took:

  1. Set up eslint rules and babel config
  2. Set up basic project arhitecture
  3. Add react-native-config and .env file
  4. Add splash screen and app icons
  5. Add react-navigation
  6. Set up redux

This template proviedes all of the above steps out of the box.

📦 src
┣ 📂 assets
┣ 📂 modules
┃ ┣ 📂 main
┃ ┣ 📂 ...
┃ ┗ 📜 index.js
┣ 📂 common
┃ ┣ 📂 services
┃ ┣ 📂 hooks
┃ ┗ 📂 ...
┣ 📂 ui
┗ 📜 index.js

⚙️ Roadmap

  • Add react-native-unistyles
  • Add react-native-config
  • Add more common UI components

Last updated: 16.11.2025.