Warning : Calling 'getNode()' on the ref an Animated Component is no longer necessary.
See original GitHub issueIs 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 ([]
).)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn’t already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
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.
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:
- Created 3 years ago
- Reactions:53
- Comments:45 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.