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

  1. Run pnpm i in FlightRN to install dependencies and run pnpm dev:all to generate bundle.harmony.js for this module.
  2. Run pnpm i in HotelRN to install dependencies and run pnpm dev:all to generate bundle.harmony.js for this module.
  3. In NativeProject/entry directory, run ohpm i to install dependencies.
  4. Open NativeProject in DevEco Studio and wait for the automatic project synchronization to complete (for manual synchronization, execute Sync and Refresh Project);.
  5. Click File > Project Structure > Signing Configs, log in and create signing config.
  6. 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.xx npm i --save-dev @react-native-oh/react-native-harmony-cli@0.84.xx

ohpm dependencies installation: ohpm i @rnoh/react-native-openharmony@0.84.xx

Result

Screenshot_home Screenshot_hotel Screenshot_flight
Home Page Hotel Page Flight Page