Introduction
This example demonstrates a common scenario in app development: a high-performance waterfall flow page, implemented using the RN framework. It leverages techniques like on-demand rendering and component reuse.
Running Effect Screenshot
Page Layout: The page consists of a top search bar, a functional area, and a waterfall layout. The waterfall layout contains live video cards, image cards, and video cards.

Operation Process:
Operation Process:
- Ensure the phone is successfully connected to the network;
- Pull-to-refresh the page:
- Step: Perform a pull-down refresh operation when the waterfall layout is at the top.
- Effect: Trigger a network request, display a loading animation, and once the data is loaded, hide the loading animation and refresh the page content.
- Pull-up to load more:
- Step: Perform a pull-up to load more operation to trigger a network request.
- Effect: Display the loading animation and prompt "- loading, please wait -". After the data loading is complete, hide the loading animation and loading prompt and display more card content.
- Auto-play live video cards:
- Step: Scroll the waterfall layout to fully display the live video card.
- Effect: The live video card will automatically start playing.
- Quickly return to the top of the page:
- Action: Click the bottom Home Tab.
- Effect: The page will automatically scroll back to the top.
Scene Implementation
For a detailed implementation, please refer to High-Performance Waterfall Flow Page with RN Framework.
Project Directory
home-fluency
├── RNHomeFluency Frontend Project
└── HomeFluency Native Project
Installation Guide
- Replace the version of
@react-native-oh/react-native-harmonyinRNHomeFluency/package.json, as well as@rnoh/react-native-openharmonyinHomeFluency/oh-package.json5andHomeFluency/entry/oh-package.json5(optional: upgrade the version); - In
RNHomeFluency, run npm i --force to install dependencies, then run npm run dev to generate the bundle file, and npm start to start the Metro service; - Open
HomeFluencyin DevEco Studio, execute Sync and Refresh Project, and copy and replaceRNHomeFluency/HomeFluency/entryintoHomeFluency/entry; - Return to DevEco Studio, delete the
.cxxandbuilddirectories underHomeFluency/entry, and click the Run button on the top right to start the project; - If running with Metro service, you need to execute
npm run startin RNHomeFluency and then reopen the application on the device.