Warnings after upgrade to Expo 27

#1

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

#3

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

3 Likes

#4

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

#5

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

1 Like

#6

Try this instead:

console.ignoreYellowBox = ['Warning:'];

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

0 Likes

#7

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.

2 Likes

#8

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?

0 Likes

#9

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

0 Likes

#10

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

0 Likes

#11

I’m also noticing issues with this.

0 Likes

#12

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.

4 Likes

#13

Thank you Expo Team !

0 Likes

closed #14

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

0 Likes