Warnings after upgrade to Expo 27

After upgrading to Expo27, my IOS app is getting the following warning messages:
05:34:47 [exp] Warning: isMounted(…) is deprecated in plain JavaScript React classes. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.

  • node_modules/react/cjs/react.development.js:92:19 in printWarning
  • … 8 more stack frames from framework internals

Does anyone know how to fix it? I have specifically set react to 16.3.1 in package.json already.

1 Like

The error comes from node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:3518

It disappears after removing else if (typeof context.isMounted === "function") { console.log(context); if (!context.isMounted()) { return undefined; } }

More info: https://github.com/facebook/react-native/issues/18868


Any way to fix it except for

  1. messing with code in node_modules
  2. suppressing the warning with YellowBox.ignoreWarnings ?

Even if I wanted to just ignore it, it seems that I can’t. I’ve tried adding the snippet to App.js suggested everywhere, but the warning still comes up in the console

import { YellowBox } from 'react-native'
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated'])

Does it work for you?

1 Like

Proposed workaround with ignoreWarnings does not work for me either. I suppose we have to wait for proper fix.

1 Like

Try this instead:

console.ignoreYellowBox = ['Warning:'];

works for me <3
@chilly the wait is over :sunglasses:

Any updates on this? Neither of these methods work for me and it’s really a pain in the console…
It has been fixed in React Native already.


hey getting same warning after upgrade and my network images are actually not loading or loading very slow too. any resolution on this for a proper fix or do we have to wait for the next expo release?

dont think ignoring warning is the right way to deal with this

I’m also noticing images loading very slowly or not at all

I’m also noticing issues with this.

Hi all – sorry for the slow response here. We’ve just published expo@27.0.2 which should remove these warnings from XDE as well. You can just update the version in your package.json and then npm i/yarn to install it.


Thank you Expo Team !

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.