Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead

This warning appears each time I open the Drawer menu or when any kind of default animations occur in my react native application. enter image description hereIs this an issue with the new version 0.62?
Anyone please help how to get rid of this warning.

Specifications:

react-native-cli: 2.0.1
react-native: 0.62.0

like image 717
Anusha Avatar asked Apr 01 '20 14:04

Anusha


2 Answers

Go to node_modules/react-native-safe-area-view/index.js

at line 192 change

this.view.getNode().measureInWindow((winX, winY, winWidth, winHeight)

to

this.view.measureInWindow((winX, winY, winWidth, winHeight)
like image 118
Aswin C Avatar answered Sep 19 '22 00:09

Aswin C


Upgrade to the latest version of react-navigation - at the time of writing that's 4.3.9. - here.

I had the error popping up on almost every screen - because id last updated the version 9months back - this issue has since been attended to in the latest versions.

like image 27
kisakye gordon Avatar answered Sep 19 '22 00:09

kisakye gordon