[ Documentation ]
Wrapping an Existing App

Wrapping an Existing App

rnx works with existing React Native apps without app code changes. Start the app the way you already do, then connect to its dev server with rnx open after the standalone install.

Basic usage

Start your app normally:

terminal
# Expo
expo start
# bare React Native / Metro
react-native start
# One
bun dev

Then connect rnx to the running dev server:

terminal
rnx open 8081

If you omit the port, rnx open scans for likely React Native dev servers and lets you pick one.

Checking compatibility

Before you wire a project into rnx, scan its dependencies:

terminal
rnx compat

The scan reports:

  • +
    Full support: the common runtime surface works
  • +
    Partial support: major APIs work, but some behavior is still missing
  • +
    Auto-stub: the package resolves, but only through a basic fallback
  • +
    Unsupported: the package still depends on native SDK behavior

Handling unsupported packages

Option 1: noop stub

For packages you do not need in the simulator:

import { defineConfig } from 'rnxsim/config'
export default defineConfig({
modules: {
'react-native-analytics': 'noop',
},
})

Option 2: custom stub

For packages that need real behavior:

// stubs/my-camera.ts
export function takePicture() {
return { uri: 'https://placekitten.com/400/400' }
}
import { defineConfig } from 'rnxsim/config'
export default defineConfig({
modules: {
'react-native-camera': { file: './stubs/my-camera.ts' },
},
})

Option 3: inline stub

For simple key-value packages:

import { defineConfig } from 'rnxsim/config'
export default defineConfig({
modules: {
'react-native-config': {
inline: { API_URL: 'http://localhost:3000' },
},
},
})