简体   繁体   English

React-Native Android:将Object作为Native Android UI Component的prop

[英]React-Native Android: Pass Object as prop for Native Android UI Component

I'm creating a Native UI component for my React-Native Android app in Java. 我正在为Java中的React-Native Android应用程序创建一个Native UI组件。 There's a fairly complex object that I need to pass in order to render the component. 我需要传递一个相当复杂的对象才能渲染组件。

Is there a way to pass an Object as a prop with the @ReactProp annotation? 有没有办法使用@ReactProp注释将对象作为道具传递?

Thanks 谢谢

使用ReadableMap解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 react-native本机ui组件android中具有自定义名称的事件 - Events with Custom names in react-native native ui component android React-Native Native UI 组件不调整大小(Android) - React-Native Native UI component doen't resize (Android) 条码扫描器反应原生 android UI 组件未显示 - Barcode scanner react-native android UI component not showing up 如何将文本传递到 React-Native 中的组件? (安卓) - How to pass text into component in React-Native? (Android) 在Android中的自定义本机UI组件react-native 0.21.0中,如何将属性从react-native传递给ViewManager中的setter方法? - In a custom native UI component in Android, react-native 0.21.0, how can I pass properties from react-native to the setter methods in a ViewManager? React-Native Android:调整本机UI组件的大小会导致停电 - React-Native Android: Resizing native UI Component causes black out react-native android:TextInput会短暂忽略值prop - react-native android: TextInput briefly ignores value prop 如何在本机Android组件的React-Native中确定DevMode? - How to determine DevMode in React-Native in Native Android Component? 将空参数传递给React-Native android中的本地模块 - Pass null arguments to native module in React-Native android 循环一个React-Native UI组件 - Loop a React-Native UI component
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM