A React Native boilerplate to kickstart your mobile app development faster, with preconfigured essentials like:
- 🔁 Redux Toolkit for scalable state management
- 📍 React Navigation for robust navigation
- 🗂️ Scalable folder structure
- 🧰 Common utility functions
- 📦 Pre-installed useful dependencies
- ⚙️ Optimized project setup for faster development
- ✅ Redux Toolkit with example slices and hooks
- ✅ React Navigation with Stack & Tab Navigator setup
- ✅ Custom folder structure for features, utils, navigation, etc.
- ✅ Useful helpers like debouncers, formatters, logger
- ✅ Theme support and central style management
- ✅ Pre-configured TypeScript and ESLint
- ✅ Common third-party libraries installed
axiosreact-native-vector-iconsreact-native-safe-area-contextreact-native-gesture-handler@react-navigation/*@reduxjs/toolkitreact-redux- And more...
template/
├── src/
│ ├── assets/ # Images, fonts, icons
│ ├── components/ # Reusable UI components
│ ├── navigation/ # Stack/Tab navigation setup
│ ├── redux/ # Redux Toolkit setup (store, slices)
│ ├── screens/ # App screens
│ ├── services/ # API and external services
│ ├── utils/ # Helper functions
│ └── theme/ # Colors, typography, spacing
├── App.tsx # Entry point
└── template.config.js # RN template config
npx @react-native-community/cli init MyApp --template @jayanta-sarkar/templateReplace
MyAppwith your app name.
-
Navigate into your project:
cd MyApp -
Install dependencies (if not already):
npm install
-
Install iOS pods (Mac only):
cd ios && pod install && cd ..
-
Start Metro server:
npx react-native start
-
Run the app:
npx react-native run-android # or npx react-native run-ios
- The Redux store is already configured in
src/redux/store.ts. - To access a slice:
// src/screens/HomeScreen.tsx
import { useAppSelector, useAppDispatch } from "../redux/store";
import { increment } from "../redux/slices/counterSlice";
const count = useAppSelector((state) => state.counter.value);
const dispatch = useAppDispatch();
<Button title="Increment" onPress={() => dispatch(increment())} />;- Defined in
src/navigation/using React Navigation. - Navigate between screens:
navigation.navigate("DetailsScreen");- Register new screens in
RootNavigator.tsx.
Use helpful utility functions from src/utils/:
import { debounce } from "../utils/debounce";
import { formatDate } from "../utils/dateUtils";- Add new slices under
redux/slices - Add new API services under
services/ - Organize screens under
screens/FeatureName/ - Keep shared components in
components/
Feel free to fork this template and customize it to fit your own style! Pull requests welcome.
MIT © Jayanta Sarkar