Description
This is a demo project with multiple JSBundles and RNInstances.
Directory Structure
MutilBundleSample
├── FlightRN Flight front-end project
├── HotelRN Hotel front-end project
├── NativeProject OpenHarmony project
└── README.md
Environment Setup
- Run npm i @react-native-oh/react-native-harmony@x.x.x in
FlightRNto install the dependency and run npm run dev:all to generate the JS bundle of the flight. - Run npm i @react-native-oh/react-native-harmony@x.x.x in
HotelRNto install the dependency and run npm run dev:all to generate the JS bundle of the hotel. - In the
entrydirectory, run ohpm i @rnoh/react-native-openharmony@x.x.x to install the dependency. - Check whether the
oh-modulesfolder is generated in theNativeProjectandentrydirectories. - Open
NativeProjectin DevEco Studio and run Sync and Refresh Project. - Click File > Project Structure > Signing Configs, log in and complete the signing.
- Click run in the upper right corner to start the project.