formidable-webview / webshell

🔥 Craft Robust React Native WebView-based components with ease.
https://formidable-webview.github.io/webshell/
MIT License
102 stars 4 forks source link

Changes signature of `onMessage` #15

Closed andreialecu closed 3 years ago

andreialecu commented 3 years ago

See:

https://github.com/formidable-webview/webshell/blob/60af580516e55783c303a721db9835e3139b8d5d/packages/webshell/src/hooks/useWebshell.ts#L93

I believe this should be onMessage({ nativeEvent });

With the current behavior, what seems to happen is that e.nativeEvent.data does not exist - and that's how it's supposed to work, but e.data does.