RN 紅屏報錯:Setting onMessage on a WebView overrides existing values of window.postMessage

在App的WebView組件中嵌入h5頁面時,總會紅屏。查閱github上的issue後,發現只有規避這個報錯信息能避免程序崩潰。 1  報錯信息如下: 2 解決方案:在html頁面中注入如下javascript代碼可避免崩潰。 const patchPostMessageFunction = () => { const originalPostMessage = window. postMess
相關文章
相關標籤/搜索