README
This is a sample project that supports capturing exceptions within bundles.
Directory Structure
├── NativeProject -- Native project
└── ReactProject -- RN project
Environment Setup
- In the
ReactProjectdirectory, execute pnpm i to install dependencies, then execute pnpm run dev to generate the bundle; - Open
NativeProjectwith DevEco Studio, and wait for the automatic project synchronization to complete (for manual synchronization, execute Sync and Refresh Project); - Navigate to File > Project Structure > Signing Configs, log in and complete the signature configuration;
- Click run in the upper right corner to start the project.
NOTE: By default, the project uses the latest RNOH dependency 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
After launch, the page effects are as follows:
|
|
|
|
|
|---|---|---|---|---|
| Home Page | Click [ReferenceError] button | Click [Standard Error] button | Click [Frozen Error] button | Click [Warning] button |