docs/en/framework/ui/react-native/index.md
//[doc-seo]
{
"Description": "Learn how to set up your development environment for React Native with ABP Framework, enabling seamless mobile app integration!"
}
//[doc-nav]
{
"Next": {
"Name": "Running on Web",
"Path": "framework/ui/react-native/running-on-web"
}
}
The React Native mobile option is available for Team or higher licenses
The ABP platform provides a basic React Native startup template to develop mobile applications integrated with your ABP-based backends.
The startup template UI is built with NativeWind v4 (Tailwind CSS for React Native) on top of a shadcn-inspired neutral palette, with full light/dark mode support. See Styling with NativeWind for the styling system reference.
Please follow the steps below to prepare your development environment for React Native.
Additional tools depend on how you plan to run the app — see the Run the application section below.
You have multiple options to initiate a new React Native project that works with ABP:
ABP Studio is the most convenient and flexible way to create a React Native application based on the ABP framework. Follow the tool documentation and select the mobile option in the solution wizard:
<div style="display:flex; flex-wrap:wrap; gap:1rem; margin:1rem 0; align-items:flex-start;"> <div style="flex:1 1 0; min-width:min(100%, 300px);"> <p style="margin:0.5rem 0 0;"><strong>Modern</strong> template — on the <em>Application Type</em> step, enable <strong>Mobile Application</strong> (React Native with Expo).</p> </div> <div style="flex:1 1 0; min-width:min(100%, 300px);"> <p style="margin:0.5rem 0 0;"><strong>Classic</strong> template — on the <em>Mobile Framework</em> step, select <strong>React Native</strong>.</p> </div> </div>The ABP CLI is another way to create an ABP solution with a React Native application. Install the ABP CLI and run the following command in your terminal:
abp new MyCompanyName.MyProjectName -csf -u <angular or mvc> -m react-native
For more options, visit the CLI manual.
This command creates a solution containing an Angular or MVC project (depending on your choice), a .NET Core project, and a React Native project.
You can choose how you want to run the mobile app:
| Goal | Documentation |
|---|---|
| Browser testing (fastest) | Running on Web — ABP Studio Default profile or Expo Web + HTTPS proxy at https://localhost:8443 |
| Emulator, simulator, or physical device | Running on Device — Pro, non-tiered Monolith: MobileEmulator profile or yarn tunnel:api; Tiered / Microservice: manual backend setup |
Before device testing (Monolith): Install cloudflared using Cloudflare's Download and install cloudflared guide. The template's Quick Tunnel workflow does not require a Cloudflare account or the remaining steps in that document.
Before running, you may need to install dependencies in the React Native project folder:
react-native/apps/mobile/react-native/Run yarn install or npm install in that folder.
Recommended: We suggest starting with Running on Web. Because it requires the fewest setup steps and provides faster development and hot-reload options compared to the physical device tests.
The default login credentials, if not changed, are:
The startup template ships with two navigation styles, switchable when the project is created:
Every main tab or drawer item is wired to its own native stack (@react-navigation/native-stack). Pushing more screens stays on that branch: the Back stack belongs to that tab or drawer route and does not mix with others. Bottom Tab and Drawer use the same screen components; they differ in how those screens are grouped and opened from the outer shell (and where the sign‑in/sign‑up flow lives in Bottom Tab versus Drawer).
How to choose: The mode is selected in ABP Studio during the Mobile Framework step. Switching modes after the project is generated is not a one-line change — you would need to add the missing navigator (and its
@react-navigation/draweror@react-navigation/bottom-tabsdependency) manually, then updatesrc/AppContainer.tsxandsrc/navigators/types.tsto match. Pick the mode upfront when possible.
The root navigator is BottomTabNavigator (src/navigators/BottomTabNavigator.tsx) with three stacks:
HomeNavigator → HomeScreen (hero greeting + feature cards).SettingsNavigator → SettingsScreen (language, theme, profile/password shortcuts).AccountNavigator — conditional stack based on the authentication state read from Redux:
AccountScreen → ChangePasswordScreen, ProfilePictureScreen.LoginScreen → RegisterScreen, ForgotPasswordScreen, ResetPasswordScreen.Tab bar colors (active/inactive tint, background, border) are sourced from the useThemeColors hook so the bar follows the active light/dark theme.
AccountScreen (src/screens/Account/AccountScreen.tsx) is the home of the AccountTab when the user is signed in. Its layout follows an iOS-style grouped pattern:
ProfilePictureScreen.ChangePasswordScreen.destructive-colored button that calls the useLogout hook.When the drawer mode is selected, DrawerNavigator (src/navigators/DrawerNavigator.tsx) replaces the bottom tabs. It exposes two drawer items:
HomeNavigator → HomeScreen, plus the auth flow (LoginScreen, RegisterScreen, ForgotPasswordScreen, ResetPasswordScreen).SettingsNavigator → SettingsScreen, ChangePasswordScreen, ProfilePictureScreen.Note that there is no AccountTab / AccountScreen in drawer mode — auth lives in the Home stack and profile/password actions live in the Settings stack. The drawer side panel itself is fully custom.
DrawerContent (src/components/DrawerContent/DrawerContent.tsx) is the custom side panel rendered by DrawerNavigator via the drawerContent prop. From top to bottom:
useLogout; when guest, a Login row that navigates to the Login screen inside HomeStack.The whole panel uses NativeWind classes with dark: variants, so it follows the active theme automatically.
To add a screen to either navigation mode:
src/screens/<FeatureName>/<FeatureName>Screen.tsx and export it from src/screens/index.ts.Stack.Screen inside the appropriate navigator (e.g. HomeNavigator, SettingsNavigator, or AccountNavigator).*ParamList in src/navigators/types.ts so the screen props stay typed.If the new screen needs to appear at the root level (a new tab or drawer item rather than a child of an existing stack), edit BottomTabNavigator.tsx or DrawerNavigator.tsx and update the corresponding BottomTabParamList / RootDrawerParamList type.
The application is up and running. You can continue to develop your application based on this startup template, or follow the Book Store mobile tutorial.