Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
asalha opened this issue Jun 9, 2021 · 4 comments

Comments

@asalha
Copy link

asalha commented Jun 9, 2021

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
Copy link

nameer94 commented Sep 2, 2021

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
Copy link

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
Copy link

AlenMartinez commented Mar 17, 2022

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants