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.
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; } }
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'])
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?
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.