react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

Not supported with latest react-native-reanimated 3.0.2

Open Abhishek2250 opened this issue 1 year ago • 9 comments

This package has external dependencies of react-native-reanimated and react-native-gesture-handler which must be installed separately. Before opening an issue related to animations or gestures please verify that you have completed ALL installation steps, including the changes to MainActivity.

Describe the bug Breaks with the latest react native v0.71.6 and react-native-reanimated v3.02 I have also tried with react-native-reanimated v2.8.0 and still got the same error

Error: TypeError: react_native_reanimated_1.default.value(0) is undefined

Platform & Dependencies Please list any applicable dependencies in addition to those below (react-navigation etc).

  • react-native-draggable-flatlist version: 4.0.1
  • Platform: iOS
  • React Native: 0.71.6
  • Reanimated version: 3.0.2
  • React Native Gesture Handler version: 2.9.0

Abhishek2250 avatar Apr 05 '23 07:04 Abhishek2250

I have this same issue.

Veeeeksi avatar Apr 11 '23 12:04 Veeeeksi

I have this same exact issue. The problem also persists with reanimated 3.1.0. I believe that the issue is the current Draggable flatlist app relies on many functions that have now been removed as Reanimated 3 dropped all support for V1.

It relies on plenty of v1 paradigms such as

outerScrollOffset?: Animated.Node; Animated.Code Animated.SpringConfig clockRunning, not, startClock, stopClock, set, cond, add, sub, block, eq useValue(_numberVar)

I hope @computerjazz has the time to come to the rescue! I have no clue where to start with refactoring all of these types, variables and conditional logic.

ucheNkadiCode avatar May 02 '23 04:05 ucheNkadiCode

Sounds like you may not actually be using the latest draggable flatlist version. All v1 code was removed as part of the 4.0.0 refactor last year. Please check your lockfile and make sure you're on latest.

computerjazz avatar May 02 '23 15:05 computerjazz

You were totally right.

I'm on RN 69.10. I upgraded to draggable-flatlist 4.0.1 and then I went ahead and upgraded to reanimated 3.1.0.

I also had to make sure to upload to the very latest version of @react-navigation/drawer to ensure it was running on V2 and up.

Thank you! This draggable-flatlist is brilliant and has saved me so much time!

ucheNkadiCode avatar May 04 '23 07:05 ucheNkadiCode

@computerjazz which lockfile are you trying to mention here?

Abhishek2250 avatar May 04 '23 14:05 Abhishek2250

I assume he means the package-lock.json in the root of your project. If you open that file and Ctrl + F "draggable-flatlist" you should be able to find it.

He is trying to ensure that you are truly on the correct version of 4.0.1 of draggable-flatlist which actually works since it no longer uses reanimated V1 functions. But version 3.xx and below of draggable flatlist are written with reanimated v1 paradigms. Upgrading should fix the issue

ucheNkadiCode avatar May 06 '23 07:05 ucheNkadiCode

@ucheNkadiCode @computerjazz I'm on the latest version 4.0.1. I checked every package.json, package-lock.json. Also, checked the installed library package.json file in node modules folder and it's using "react-native-reanimated": "^2.8.0",

"devDependencies": { "@testing-library/react-native": "^7.2.0", "@types/react": "^17.0.5", "@types/react-native": "^0.64.5", "babel-jest": "^26.6.3", "husky": "^4.2.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.71.0", "prettier": "^2.2.1", "pretty-quick": "^2.0.1", "react": "^17.0.2", "react-native": "^0.64.0", "react-native-builder-bob": "^0.18.2", "react-native-gesture-handler": "^2.1.0", "react-native-reanimated": "^2.8.0", "react-test-renderer": "^17.0.2", "typescript": "^4.2.4" },

Abhishek2250 avatar May 07 '23 03:05 Abhishek2250

@Abhishek2250 do you get to pass your package.json?

vieirapontomais avatar Jun 09 '23 19:06 vieirapontomais

Faced a problem on react-native-draggable-flatlist v3, updated on v. 4.0.1 and it was fixed

Djhitman avatar Nov 01 '23 18:11 Djhitman