skpm / sketch-module-web-view

A sketch module for creating an complex UI with a webview
MIT License
289 stars 62 forks source link

throw on unknown action breaks react-devtools #163

Open yesmeck opened 3 years ago

yesmeck commented 3 years ago

Since react-devtools will also use postMessage to communicate with webview, so throw on unknown action breaks the react-devtools.

https://github.com/skpm/sketch-module-web-view/blob/e9dfe385aa0bb2f555324094fc57c2fb68394c1b/lib/inject-client-messaging.js#L7-L9

yesmeck commented 3 years ago

@mathieudutour Why wontfix? I don't see actionName was used anywhere.

mathieudutour commented 3 years ago

It won't matter whether we throw or not because we completely replace the postMessage method. So the issue would be to design another mechanism to communicate with the webview - and we won't do that.