platform/harmony/lynx_harmony/README.md
Lynx is a family of open-source technologies empowering developers to use their existing web skills to create truly native UIs for both mobile and web from a single codebase, featuring performance at scale and velocity. The official website is: https://lynxjs.org/
This module includes the core components for rendering, event handling, native module communication, and service management.
ohpm install @lynx/lynx
To get started with Lynx for harmony, you can embed a LynxView component in your application's UI layout and provide it with a bundle to render.
import { LynxView } from '@lynx/lynx';
@Entry
@Component
struct Index {
build() {
Column() {
LynxView({
url: 'main.lynx.bundle'
}).width('100%').height('100%')
}
}
}
You can add dependency in oh-package.json5 like this:
{
"dependencies": {
"@lynx/lynx": "0.0.1-alpha.1",
}
}