I am trying to pass token and other user details from React Web application to React Native application with Webview (react-native).
When I do
window.postMessage(JSON.stringify(reactNativeObj), '*');
and log the event in React native application with
console.log( "On Message", event.nativeEvent.data );
It is printing the log as
On Message: setImmediate$0.4162155499933975$1
It should print my object instead.
I have tried almost everything and re-read the document https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage but couldn't make it work.
Any help would be appreciated.