How to send data from MainActivity to React Native side #176
Replies: 3 comments 5 replies
-
You would have to use the EventDispatcher. |
Beta Was this translation helpful? Give feedback.
-
@cortinico Thanks for the reply. The example you mentioned is of Fabric Components. Is the approach same for sending string data from MainActivity if I don't have a Fabric Component. Also, I did try the approach yo recommended
Yo can please guide on how do I listen to this in my react component |
Beta Was this translation helpful? Give feedback.
-
I'm facing same issue, has anybody figured out? What's the proper (new architecture) way? |
Beta Was this translation helpful? Give feedback.
-
I have enabled the new architecture for android using React Native v0.74. I need to pass some data from MainActivity to React Native. Previously I used to use something like below code
But I get a crash saying
context
is null, this way used to work with React Native 0.73 for new and old arch, what is the recommended approach nowBeta Was this translation helpful? Give feedback.
All reactions