FilesLast commitLast update
2 months ago
2 months ago
1 year ago
1 year ago
2 months ago
1 month ago
1 month ago
README

Description

This is the demo project for RNOH Autolinking.

Directory Structure

AutolinkingSample
├── NativeProject OpenHarmony project
├── react-native-oh Empty placeholder directory (RNOH dependencies are installed from pnpm)
├── ReactProject Front-end project
├── screenshots Screenshots
├── third-party-library-sample RN third-party library sample
├── README.md
└── README_zh.md

Environment Setup

  1. Run pnpm pack in the third-party-library-sample directory to package the library;
  2. Execute pnpm i in the ReactProject directory to install dependencies, then run pnpm dev to generate the bundle.harmony.js bundle file;
  3. Open NativeProject with DevEco Studio, and wait for the automatic project synchronization to complete (for manual synchronization, execute Sync and Refresh Project);
  4. Navigate to File > Project Structure > Signing Configs, log in and complete the signature configuration;
  5. Click run in the upper right corner to start the project.

Preview

After startup, the page looks as follows:

AutolinkingSample running UI

  1. Tap 点击滚到顶; the sheet scrolls to the top;
  2. After it scrolls to the top, pull down; the final position stays in the middle or returns to the top based on the scroll offset;
  3. Tap 选项1/2/3; a selected state appears on the right of the option;
  4. Tap 确定; the corresponding option value is printed in the VS Code console, for example: {"target": 14, "value": [1]};
  5. Tap 现在是单选; the button text changes to 现在是多选. Keep tapping 选项1/2/3 to select multiple options;
  6. Tap 确定; the corresponding option values are printed in the VS Code console, for example: {"target": 14, "value": [1,2]};