Fixing React Native WebView’s postMessage for iOS

The error that should have never been.

In 2016, GitHub user Robert Roskam (raiderrobert) opened an issue on the React Native repository reporting the error “Setting onMessage on a WebView overrides existing values of window.postMessage, but a previous value was defined”. In the two years since then, nothing has been done to resolve it within the internal React Native implementation of WebView.

--

--

--

Staff front end engineer | Tech lead | Architect | charlesstover.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A Guide to Authentication using Passport-Local in React

An intro to {props.children} in Framer X

Inheritance in JavaScript: Read & Practice

THE USECASE OF JAVASCRIPT IN INDUSTRIES

Sea and Jellyfishes: Introduction

Replace null values in JSON Object — JavaScript

Replace null values in JSON Object

Angular Router Concepts & Patterns

Introduction to Electron

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Charles Stover

Charles Stover

Staff front end engineer | Tech lead | Architect | charlesstover.com

More from Medium

Archiving iOS React Native app in an NRWL monorepo: debugging guide

Working with Stack Navigation in React Native with Typescript

Disabling Bottom Navigation Tabs in React-Native

Switch between project build variants (staging, production, etc) in React Native — part 1