React Native Solve Warning isMounted(…) is deprecated in plain JavaScript Error

Since updating to new version of React Native 0.55 we all have been starting to seeing a yellow error message box in our newly build react native application “Warning: isMounted(…) is deprecated in plain JavaScript React Classes. Instead, make sure to clean up subscriptions and pending request in componentWillUnmount to prevent memory leaks.” This error message is coming because of some comparability issue of react native current version. There is no need to worry this is simply a error message and can be easily hide. So in this tutorial we would going to Solve Warning isMounted(…) is deprecated in plain JavaScript Error in newly build Android iOS react native application.

The error message should look like below screenshot:

Solve Warning isMounted
Solve Warning isMounted(…) is deprecated in plain JavaScript Error in Android iOS  newly build React Native App:

1. This message can be hide using YellowBox component, YellowBox component is used to manage every yellow box error notifications messages.

2. Import YellowBox component in your project.

3. Now Inside your class constructor() call the ignoreWarnings() function of YellowBox .

After using this code, Simply re-build your app and now you see the error is gone, Enjoy 🙂 .

Leave a Reply

Your email address will not be published. Required fields are marked *