react-native-scroll-bottom-sheet icon indicating copy to clipboard operation
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()

Open asalha opened this issue 3 years ago • 4 comments

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

asalha avatar Jun 09 '21 17:06 asalha

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
  ...

nameer94 avatar Sep 02 '21 07:09 nameer94

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;

akshy78695 avatar Sep 21 '21 15:09 akshy78695

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:---

AlenMartinez avatar Mar 17 '22 20:03 AlenMartinez

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

miguelcast avatar Nov 22 '22 22:11 miguelcast