question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning : Calling 'getNode()' on the ref an Animated Component is no longer necessary.

See original GitHub issue

Is this a bug report, a feature request, or a question?

Question

Have you followed the required steps before opening a bug report?

(Check the step you’ve followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn’t a React Native bug?

It is a warning regarding deprecation of the method getNode().

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

(Write your answer here and specify the iOS/Android versions on which you’ve been able to reproduce the issue.)

Is the bug reproductible in a production environment (not a debug one)?

Yes.

Environment

React native: 0.62.0 react-native-snap-carousel: 3.8.4

Target Platform: Android (9.0) iOS (13.3)

Expected Behavior

No warning should be raised. Upgrade is needed.

Actual Behavior

Raise of a warning. image

Reproducible Demo

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:53
  • Comments:45 (3 by maintainers)

github_iconTop GitHub Comments

94reactions
binar1commented, Apr 9, 2020

i fixed ,in this way, go to nodeModule -> react-native-snap-carousel -> src -> Carousel.js modify

const AnimatedFlatList = FlatList ? Animated.createAnimatedComponent(FlatList) : null; const AnimatedScrollView = Animated.Animated.createAnimatedComponent(ScrollView);

to const AnimatedFlatList = FlatList ? Animated.FlatList : null; const AnimatedScrollView = Animated.ScrollView;

after find function _getWrappedRef
modify like this _getWrappedRef () { // https://github.com/facebook/react-native/issues/10635 // https://stackoverflow.com/a/48786374/8412141 return this._carouselRef
}

then save it . I Hope This can Help you

42reactions
ovy9086commented, May 13, 2020

I don’t know how all you guys commenting “waiting” here think this will solve the problem. maybe stop polluting the thread with useless comments, and a 👍 should be enough. I think it’s clear enough until now that a lot of people are ‘waiting’ for this fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calling getNode() on the ref of an Animated component is ...
I got an warning: ReactNativeFiberHostComponent: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use...
Read more >
Calling `getNode()` on the ref of an Animated component is ...
Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead · react-native...
Read more >
Calling `getNode()` on the ref of Animated component is no ...
ReactNativeFiberHostComponent: Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This ......
Read more >
Calling getNode() on the ref of an Animated component is ...
ReactNativeFiberHostComponent: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use the ...
Read more >
Calling `getNode()` on the ref of an Animated component is ...
[Solved]-Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead-React Native.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found