Packages

react-native-webview

14.0.1 · 20 Jun 2026MIT8.8M / weekRepositoryHomepagenpmAtom feed

Your version

5.0.0

major1 Feb 2019Where it was published

5.12.1 is the newest release of 5.x.

npm marks 5.0.0 as deprecated: Wrong casing on window.ReactNativeWebView

In short

1 breaking1 new

  • Breaking

    Android/iOS postMessage:

Security

1 advisory affects 5.0.0

Release note

Features

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.