mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-28 21:48:13 +08:00
1.0 KiB
1.0 KiB
Introduction To Hippy-react
hippy-react is a React-to-native rendering layer redeveloped based on React's official custom renderer react-reconciler, which can use all of React's features. Now React17 is used.
Architecture Diagram
Initialization
import { Hippy, View } from '@hippy/react';
import React, { Component } from 'react';
new Hippy({
appName: 'Demo',
entryPage: App,
// set global bubbles, default is false
bubbles: false,
// set log output, default is false
silent: false,
}).start();
class App extends Component {
constructor(props) {
// Initialization parameters from native to front end.The native can put some custom properties required for startup into the entry file props
super(props);
}
render() {
const { __instanceId__: instanceId } = this.props;
console.log('instanceId', instanceId);
return (
<View></View>
);
}
}