Question
(Check the step you've followed - put an x character between the square brackets ([]).)
It is a warning regarding deprecation of the method getNode().
(Write your answer here and specify the iOS/Android versions on which you've been able to reproduce the issue.)
Yes.
React native: 0.62.0
react-native-snap-carousel: 3.8.4
Target Platform:
Android (9.0)
iOS (13.3)
No warning should be raised. Upgrade is needed.
Raise of a warning.

(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.)
having same issue react-native v 0.61 occurs implementing nested navigation.
@lumberman Give #673 a try :)
same problem but im using the 'react-native-image-slider-box' which is using the carousel.
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 fixed ,in this way,
go to nodeModule -> react-native-snap-carousel -> src -> Carousel.js
modifyconst 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 () {
// facebook/react-native#10635
// https://stackoverflow.com/a/48786374/8412141
return this._carouselRef
}then save it .
I Hope This can Help you
Thankyou so much, It helped.
Hi, any updates on when this will be release ?
I am looking for the release too :)
waiting for the release
waiting for release too
waiting for release too ;)
+1 waiting for the release
waiting for release too!
waiting for release too!
ÂżCuando se arreglara ese problema en el repositorio?
I am looking for the release too
+1
+1
Would love to see this 'acclaimed' release
Waiting....
Yes waiting...
Waiting
Yes waiting...
Waiting for this release too
waiting
waiting too..
waiting
waiting ..
waiting
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.
Why the PR is not merged yet? It is really annoying working with those warnings
Probably because it is really complicated to detect the RN package Version the right way.
i fixed ,in this way,
go to nodeModule -> react-native-snap-carousel -> src -> Carousel.js
modifyconst 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 () {
// facebook/react-native#10635
// https://stackoverflow.com/a/48786374/8412141
return this._carouselRef
}then save it .
I Hope This can Help you
Thanks, This is also working with react-native-image-slider-box.... Thanks for help
Chill out and wait a little guys. It’s been 10 days not 10 months since the PR was filed and theres an ongoing discussion about the implementation. Either contribute or be patient. Open source doesn’t work by stressing contributors out but by contributing and being grateful for the contributions of others.
Well, the main issue is that the suggested implementation is not backward compatible, meaning the plugin will break on every version of React Native but 0.62+.
This is a no-go for us, so unless someone comes up with a backward-compatible solution, we just can't merge this. (Take a look at #673 if you want to follow the discussion.)
Basically, what we need is a surefire way to identify whether getNode() needs to be called or not.
What we've tried so far:
Detecting RN's version by checking the project's package.json file
Checking for setNativeProps
Running out of ideas here, so if you have a reliable solution, don't be shy and share it with us :-)
Ok, looks like this is going to be fixed pretty soon!
Fixed in versions 3.9.1 and 4.0.0-beta.4 with backward-compatible code.
Hi! I reached out this thread when I faced this 'getNode()' warning and I was using v3.9.0 and when I upgraded to v3.9.1 it still shows the 'getNode()' warning.
_getWrappedRef () {
if (this._carouselRef && (
(this._needsScrollView() && this._carouselRef.scrollTo) ||
(!this._needsScrollView() && this._carouselRef.scrollToOffset)
)) {
return this._carouselRef;
}
// https://github.com/facebook/react-native/issues/10635
// https://stackoverflow.com/a/48786374/8412141
return this._carouselRef && this._carouselRef.getNode && this._carouselRef.getNode();
}
I am running on react-native v 0.62.2
In updated version I changed this
const AnimatedFlatList = FlatList ? Animated.createAnimatedComponent(FlatList) : null;
const AnimatedScrollView = Animated.Animated.createAnimatedComponent(ScrollView);
to this:
const AnimatedFlatList = FlatList ? Animated.FlatList : null;
const AnimatedScrollView = Animated.ScrollView;
as mentioned by @binar1 above
I think any how this change did not get pushed into the update.
In the 3.9.1 release, the error did not disappear, so I used the @HarshitMadhav advice and with the help of patch-package fixed the problem so as not to wait for a new release. Thanks @HarshitMadhav !
I can confirm that this warning has not been resolved
Most helpful comment
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