framework/ohos/README.md
Hippy is a cross-platform development framework, that aims to help developers write once, and run on multiple platforms(iOS, Android, ohos, Web, and so on). Hippy is quite friendly to Web developers, especially those who are familiar with React or Vue. With Hippy, developers can create the cross-platform app easily.
Hippy is now applied in Tencent major apps such as Mobile QQ, Mobile QQ Browser, Tencent Video App, QQ Music App, and Tencent News, reaching hundreds of millions of ordinary users.
Install latest DevEco Studio.
ohpm i hippy@latest
Get libhippy.so and UIAbility context.
import libHippy from 'libhippy.so'
AppStorage.setOrCreate("libHippy", libHippy)
AppStorage.setOrCreate("abilityContext", this.context)
AppStorage.setOrCreate("mainWindow", mainWindow)
Create HippyEngine、init HippyEngine、and load js bundle.
this.hippyEngine = createHippyEngine(params)
this.hippyEngine.initEngine()
this.hippyEngine?.loadModule()
Build HippyRoot component.
HippyRoot({
hippyEngine: this.hippyEngine,
rootViewWrapper: this.rootViewWrapper,
onRenderException: (exception: HippyException) => {
this.exception = `${exception.message}\n${exception.stack}`
},
})
hippyEngine?.destroyModule(rootId, () => {
hippyEngine?.destroyEngine();
});
More details for ohos SDK integration.
To check out hippy examples and visit framework.tds.qq.com.