react-native-webview
14.0.1 · 20 Jun 2026MIT8.8M / weekRepositoryHomepagenpmAtom feed
5.12.1 is the newest release of 5.x.
In short
1 breaking1 new
- Breaking
Android/iOS postMessage:
Security
1 advisory affects 5.0.0
- ModerateAndroid WebView Universal Cross-site ScriptingGHSA-36j3-xxf7-4pqg · 2 Oct 2020No fix yet
Release note
Features
Android/iOS postMessage: refactoring the old postMessage implementation (#303) (f3bdab5), closes #29 #272 #221 #105 #66
Breaking changes
- Breaking
Android/iOS postMessage:
Communication from webview to react-native has been completely rewritten. React-native-webview will not use or override window.postMessage anymore. Reasons behind these changes can be found throughout so many issues that it made sense to go that way.
window.postMessage(data, *) has been changed to
window.ReactNativeWebView.postMessage(data)
Side note: if you wish to keep compatibility with the old version when you upgrade, you can use the injectedJavascript prop to do that:
const injectedJavascript = `(function() {
window.postMessage = function(data) {
window.ReactNativeWebView.postMessage(data);
};
})()`;A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.