简体   繁体   English

有没有办法从 Native Android 代码调用 React Native function 代码?

[英]Is there a way to call a React Native function from Native Android Code?

Looking for a way to call a React Native function from Native Android Code.寻找一种从 Native Android 代码调用 React Native function 的方法。

Thanks in Advance.提前致谢。

check this in react native documentation.在反应本机文档中检查这一点。

https://reactnative.dev/docs/communication-ios#calling-react-native-functions-from-native-events https://reactnative.dev/docs/communication-ios#calling-react-native-functions-from-native-events

once you created the custom native component you can trigger events and process those in react native.创建自定义原生组件后,您可以触发事件并在 react native 中处理这些事件。

ios: https://reactnative.dev/docs/native-components-ios#events ios: https://reactnative.dev/docs/native-components-ios#events

android: https://reactnative.dev/docs/native-components-android#events android: https://reactnative.dev/docs/native-components-android#events

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM