Migrate a React Native app

Port an existing React Native or Expo app to NitroUI. Keep your React and TypeScript code and replace the parts that depend on the React Native runtime.

Start with one screen and the flow that leads to it. Keep the existing app running so you can compare both builds on iOS and Android.

What can you reuse?

Part of the appWhat to do in NitroUI
React hooks, state, and TypeScript logicReuse code that has no React Native or Expo dependency. Check the imports of shared packages, since a package can use the native runtime indirectly.
Screen layout and controlsPort the JSX to NitroUI components. Move layout properties from React Native's style to NitroUI's layout prop.
NavigationRebuild stacks and tabs with NitroUI navigation. Keep the route parameters and verify the paths users take to reach each screen.
Native libraries and modulesLook for a compatible NitroUI package or expose the underlying Swift, Kotlin, or C++ code through Nitro modules.

Port your first screen

  1. Follow Installation to create a NitroUI project and run it alongside the original app.
  2. Keep the starter's registerApp entry point. Replace its root component with your app's providers and the screen you want to port.
  3. Switch imports for host components such as View and Text from react-native to nitro-ui-renderer. Check the component docs as you port each prop.

For example, move flex and padding from the React Native view's style object to layout:

src/App.tsx
import { Text, View } from 'nitro-ui-renderer'

export function App() {
  return (
    <View layout={{ flex: 1, padding: 16 }}>
      <Text>Continue where you left off</Text>
    </View>
  )
}

Exercise the same flow in both apps using the same data. Check that you can open the screen, complete its main action, and go back. Use Your first screen for a working example that connects native input to React state.

Before replacing a released app, test an in-place update on a device with the existing build installed. Use matching app identifiers and compatible signing, then check session state, stored data, and incoming links.

If you're migrating with a coding agent, give it the React Native migration skill and the original app's source.

On this page