computerjazz / react-native-draggable-flatlist

A drag-and-drop-enabled FlatList for React Native
MIT License
1.95k stars 408 forks source link

ReactNativeFiberHostComponent: Calling getNode() 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. #277

Open Preeternal opened 3 years ago

Preeternal commented 3 years ago

Describe the bug I got an warning: ReactNativeFiberHostComponent: Calling getNode() 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.

slavagoreev commented 3 years ago

@Preeternal please, see this response. Reanimated should be of v1. yarn add react-native-reanimated@1

https://github.com/computerjazz/react-native-draggable-flatlist/issues/244#issuecomment-777841894

hraschan commented 3 years ago

Is their a way to use Reanimated version 2 without the above mentioned warning?

freezen82 commented 3 years ago

i have same issue with expo sdk 41. it updated Reanimated v2 and not downgradable.

dkoodev commented 3 years ago

Will this package support using reanimated v2 in the future?

alburdette619 commented 3 years ago

Also interested in using with reanimated v2, we are using it and hermes on both platforms.

NxsHbb commented 3 years ago

@Preeternal please, see this response. Reanimated should be of v1. yarn add react-native-reanimated@1

#244 (comment)

I am using expo SDK 42 and this solved my problem. Thanks....

Makatun commented 3 years ago

I am using expo SDK 42 too but still see the problem

salamisodikiolawale commented 3 years ago

Hello, I have the same and my project works with expo, I tried the different methods but I had errors 500. and so I came back to version 2 of reanimed, how can I set the warning with expo. it is urgent please

slavagoreev commented 3 years ago

Hello, I have the same and my project works with expo, I tried the different methods but I had errors 500. and so I came back to version 2 of reanimed, how can I set the warning with expo. it is urgent please

The only way how you may handle this is to ignore this error.

// App.tsx
import { LogBox } from 'react-native';

LogBox.ignoreLogs([
  'ReactNativeFiberHostComponent: Calling getNode() 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.',
]);
slavagoreev commented 3 years ago

Exactly the same fix were added to the library in https://github.com/computerjazz/react-native-draggable-flatlist/pull/278/files

salamisodikiolawale commented 3 years ago

How do I go about it? i begining to react-native, can you give me directive for solve problems.

slavagoreev commented 3 years ago

How do I go about it? i begining to react-native, can you give me directive for solve problems.

  1. Use reanimated v2
  2. Add the code I provided above in your App.jsx
  3. It will suspend the warning and the rest will work just fine
salamisodikiolawale commented 3 years ago

https://github.com/computerjazz/react-native-draggable-flatlist/issues/277#issuecomment-880616826

Yessss, Thank you so much, it works.

jamesxabregas commented 3 years ago

I hope everyone here realizes that hiding a deprecation warning isn't a real solution to this problem, it's just a convenient way to forget it exists until one day React Native does deprecate it and this library is broken...

itsramiel commented 3 years ago

is there a solution for this, or will this package get updated? It is a really useful one for react native developers

maxfahl commented 3 years ago

I'm really hoping for some issues to get resolved. This is an extremely helpful project, unfortunately it's open source, so we can't count on frequent updates.

itsramiel commented 3 years ago

I believe it is being worked on. I install the beta version using "npm install react-native-draggable-flatlist@3.0.0-beta.11". The error is fixed and seem to be working fine, but i guess it is still being tested

maxfahl commented 3 years ago

That's great news. Did not check for other branches. Seems there has been some activity lately, awesome!

I'm really thankful for the work you're doing here @computerjazz, my application would be kind of a mess without this package.

NxsHbb commented 2 years ago

Exactly the same fix were added to the library in https://github.com/computerjazz/react-native-draggable-flatlist/pull/278/files

Thanks. updating react-native-draggable-flatlist solved my issue.