How to send a value from react-native to android a

2020-05-07 18:24发布

问题:

I want to send a rowId from react native Listview to one of method in my android activity.the reason is I am integrating react to an existing android app. so for the time sake I wana send rowID for further process. Any idea on this?

回答1:

Have a look at React Modules Android & React Modules IOS

This is the only way to communicate with React component and native component.

You need to create a react method in module and use that to accept the value and send it across to native activity.