react-native-scroll-bottom-sheet
react-native-scroll-bottom-sheet copied to clipboard
Error: ... You can now directly use the ref instead. This method will be removed in a future release., FlatList, getNode()
Current Behavior
Getting the following error when scrolling down + hide on Android: %s: Calling %s on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release., FlatList, getNode()
index.tsx line 781. Removed getNode() and the warning is gone.
Before: // @ts-ignore const node = this.props.innerRef.current?.getNode();
After: // @ts-ignore const node = this.props.innerRef.current;
How to reproduce
Just scroll down from inside the FlatList very fast and you get the error.
Your Environment
version | |
---|---|
Platform (Android, iOS or both) | |
react-native-scroll-bottom-sheet | |
react-native | |
react-native-gesture-handler | |
react-native-reanimated |
same here
%s: Calling %s on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release., ReactNativeFiberHostComponent, getNode()
Stack trace:
node_modules/react-native/Libraries/LogBox/LogBox.js:117:10 in registerWarning
node_modules/react-native/Libraries/LogBox/LogBox.js:63:8 in warnImpl
node_modules/react-native/Libraries/LogBox/LogBox.js:36:4 in console.warn
node_modules/expo/build/environment/react-native-logs.fx.js:18:4 in warn
http://10.10.20.104:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:166542:28 in getNode
node_modules/react-native-scroll-bottom-sheet/src/index.tsx:777:18 in call$argument_1
node_modules/react-native-reanimated/src/reanimated1/core/AnimatedCall.js:9:15 in listener
node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:189:10 in emit
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:416:4 in __callFunction
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:109:6 in __guard$argument_0
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
[native code]:null in callFunctionReturnFlushedQueue
...
Go To: node_modules/react-native-scroll-bottom-sheet/src/index.tsx
find this line: const node = this.props.innerRef.current?.getNode();
remove getNode(); const node = this.props.innerRef.current;
Actualmente sigue el error. Puedes librarte de ese error al insertar en el componente ScroollBottomSheet un innerRef= Ejemplo:
--The error currently follows. You can get rid of that error by inserting an innerRef= Example into the ScroollBottomSheet component:---
This works for me, add innerRef
with value 1
like @AlenMartinez