Description
A demo project with multiple JSBundles and RNInstances.
Directory Structure
MutilBundleSample
├── FlightRN Frontend project for the flight module
├── HotelRN Frontend project for the hotel module
├── NativeProject OpenHarmony project
└── README.md
Usage
- Run pnpm i in
FlightRNto install dependencies and run pnpm dev:all to generate bundle.harmony.js for this module. - Run pnpm i in
HotelRNto install dependencies and run pnpm dev:all to generate bundle.harmony.js for this module. - In
NativeProject/entrydirectory, run ohpm i to install dependencies. - Open
NativeProjectin DevEco Studio and wait for the automatic project synchronization to complete (for manual synchronization, execute Sync and Refresh Project);. - Click File > Project Structure > Signing Configs, log in and create signing config.
- Click run in the upper right corner to start the project.
NOTE: The project uses the latest RNOH dependencies by default. If you need to install a specific version, please refer to RNOH Version Evolution Plan and Branch Strategy
npm dependencies installation:
npm i @react-native-oh/react-native-harmony@0.84.xxnpm i --save-dev @react-native-oh/react-native-harmony-cli@0.84.xxohpm dependencies installation:
ohpm i @rnoh/react-native-openharmony@0.84.xx
Result
![]() |
![]() |
![]() |
|---|---|---|
| Home Page | Hotel Page | Flight Page |


