Description
This is a demo project using RNSurface.
Directory Structure
using_RNSurface
├── SampleProject RN project
└── SampleApp Native project
Environment Setup
- In the
SampleProject/MainProjectdirectory, run pnpm i to install dependencies, then run pnpm dev to generate the bundle.harmony.js; - Open
SampleAppin 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 complete the signing;
- Click run in the upper right corner of DevEco Studio to start the project;
NOTE: The project uses the latest RNOH dependencies by default during installation. If you need to install a specific version, please refer to RNOH Version Evolution Planning and Branch Strategy to get the version number.
npm dependency 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 dependency installation:
ohpm i @rnoh/react-native-openharmony@0.84.xx
Preview
The page effect after startup is as follows:
