HarmonyOS ArkTS容器中需要加载RN自定义视图,需要怎么添加到视图上?

// RN自定义区域customView
class customView extends React.Component {
  render() {
    return (
      <View style={{height: 40, backgroundColor: 'blue'}}>
  <Text
  onPress={() => {
    alert('RN自定义View点击');
  }}>
RN自定义View
  </Text>
  </View>
);
}
}
// 导出自定义View
AppRegistry.registerComponent('rNCustomView', () => customView);
HarmonyOS
2024-12-25 09:58:52
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
fox280

使用RNApp或RNSurface。

分享
微博
QQ
微信
回复
2024-12-25 12:28:51
相关问题
HarmonyOS 组件在其父视图上的位置
521浏览 • 1回复 待解决
HarmonyOS 卡片添加到负一屏
721浏览 • 1回复 待解决
ArkTs如何自定义容器组件?
3383浏览 • 1回复 待解决
HarmonyOS Grid容器视图更新问题
695浏览 • 1回复 待解决
HarmonyOS app版本升级需要自定义弹框
369浏览 • 1回复 待解决