rgommezz / react-native-scroll-bottom-sheet

Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land :fire:
MIT License
1.54k stars 64 forks source link

Error: ... You can now directly use the ref instead. This method will be removed in a future release., FlatList, getNode() #72

Open asalha opened 3 years ago

asalha commented 3 years ago

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
nameer94 commented 3 years ago

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
  ...
akshy78695 commented 2 years ago

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;

AlenMartinez commented 2 years ago

Actualmente sigue el error. Puedes librarte de ese error al insertar en el componente ScroollBottomSheet un innerRef= Ejemplo:

image

--The error currently follows. You can get rid of that error by inserting an innerRef= Example into the ScroollBottomSheet component:---

miguelcast commented 1 year ago

This works for me, add innerRef with value 1 like @AlenMartinez

Captura de pantalla 2022-11-22 a la(s) 5 26 08 p m