A well-structured Expo Boilerplate built on RTK Query and Redux architecture to streamline React Native development. This boilerplate provides a scalable, maintainable, and production-ready setup for your mobile applications.
- RTK Query & Redux Toolkit β Efficient state management and API handling
- Zustand Support β Lightweight alternative for global state management
- Expo Router β File-based routing for a better navigation experience
- Localization (i18n) β Multi-language support
- Centralized Loading & Error Handling β Consistent error and loading state management across the app
- Reusable Components β Well-structured UI components
- Custom Hooks β Optimized hooks for state and effect management
- Scalable Architecture β Organized and maintainable folder structure
- TypeScript Ready β Strongly-typed project for reliability
src
βββ app # Entry point or global app setup
βββ assets # Fonts, images, videos, etc.
β βββ fonts
β βββ images
βββ components # Reusable UI components
βββ config # App-wide configurations
β βββ appConfig.ts
β βββ dynamicDimension.ts
β βββ theme.ts
βββ constants # App constants and color definitions
β βββ appConstants.ts
β βββ appColors.ts
βββ hooks # Custom React hooks
β βββ useColorScheme.ts
β βββ useColorScheme.web.ts
β βββ useLocalization.ts
β βββ useThemeColor.ts
βββ localization # i18n and translation logic
βββ selector # Redux selectors or custom selectors
β βββ selector.ts
βββ service # API services
β βββ axiosInstance.ts
β βββ query
β βββ baseQuery.ts
β βββ rtkQuery.ts
βββ store # Redux or RTK store setup and middlewares
β βββ apiErrorMiddleware.ts
β βββ store.ts
βββ types # TypeScript types/interfaces
β βββ ApiRequest.ts
β βββ ApiResponse.ts
βββ utils # Utility/helper functions
β βββ common.ts
βββ zustand # Zustand stores (state management)
β βββ apiErrorStore.ts
β βββ appStore.ts
β βββ snackBarStore.ts
- Expo - An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
- React-Native - React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.
- Expo-Router - Expo Router is a file-based router for React Native and web applications. It allows you to manage navigation between screens in your app, allowing users to move seamlessly between different parts of your app's UI, using the same components on multiple platforms (Android, iOS, and web).
- Expo-Font - Expo Font allows loading fonts from the web and using them in React Native components
- Redux - Redux is an open-source JavaScript library for managing and centralizing application state. It is most commonly used with libraries such as React or Angular for building user interfaces.
- RTK-Query - The official, opinionated, batteries-included toolset for efficient Redux developmen
- Axios - Promise based HTTP client for the browser and node.js.
- Redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development.
- Netinfo - React Native Network Info API for Android, iOS, macOS, Windows & Web.
- zustand - A small, fast and scalable bearbones state-management solution using simplified flux principles. Has a comfy API based on hooks.
- react-native-async-storage - An asynchronous, persistent, key-value storage system for React Native.
- react-native-paper - Material Design for React Native (Android & iOS).
- react-native-vector-icons- Customizable Icons for React Native with support for image source and full styling.
- patch-package - Fix broken node modules instantly
- ESLint - ESLint statically analyzes your code to quickly find problems. It is built into most text editors and you can run ESLint as part of your continuous integration pipeline.
- TypeScript - TypeScript is JavaScript with syntax for types.
git clone git@github.com:piashcse/react-native-boilerplate.git
yarn install
Now, you can choose a command to run the project:
yarn ios
to run on iOS simulatoryarn android
to run on Android simulator
Mehedi Hassan Piash
Copyright 2023 piashcse (Mehedi Hassan Piash)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.