android - React Native - Send event from Javascript to Native -


i have been following steps in this page of react native documentation on how hook native modules.

the documentation discusses how it's possible send event native code javascript, need able send events in other direction, i.e javascript native code. possible deviceeventemitter?

my use case following, native module loads react native bundle, in case login page. login details entered , checked against api , when response has come need able return result javascript native module can resolve original promise on react method.

any ideas?

thanks.

you have solved problem. if not then, can define methods in java available javascript. steps covered in below document, https://facebook.github.io/react-native/docs/native-modules-android.html

you can directly when invoke these methods javascript when api response received.


Comments