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

Tried to modify key `current` of an object which has been already passed to a worklet

Open rodrigo2392 opened this issue 1 year ago • 8 comments

Describe the bug I can see a warning realated to modify a prop from a ref i think, not shure were is it happening

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

  • react-native-draggable-flatlist version: 4
  • Platform: Android
  • React Native or Expo version: 0.74.2
  • Reanimated version: 3.12.1
  • React Native Gesture Handler version:

Additional context Screenshot_1718991693

https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-modify-key-of-an-object-which-has-been-converted-to-a-shareable

rodrigo2392 avatar Jun 21 '24 17:06 rodrigo2392

+1 The same is happening to me.

react-native-draggable-flatlist: "4.0.1", both with Android and iOS. react-native-reanimated: 3.12.1

luca-tomasetti avatar Jun 24 '24 08:06 luca-tomasetti

+1 I have the same issue "react-native-draggable-flatlist": "4.0.1" "react-native-reanimated": "3.12.1"

Sistemas7penna avatar Jun 25 '24 13:06 Sistemas7penna

+1 the same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.12.1",

siregic avatar Jun 27 '24 15:06 siregic

+1

"react-native-draggable-flatlist": "^4.0.1",
"react-native-reanimated": "^3.12.1",

rogerdribeiro avatar Jun 30 '24 14:06 rogerdribeiro

+1 the same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.6.1",

zhanglei1996 avatar Jul 01 '24 07:07 zhanglei1996

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.12.1",

inho1019 avatar Jul 02 '24 08:07 inho1019

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.6.1",

rssj avatar Jul 02 '24 18:07 rssj

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.6.1",

trxkhiem avatar Jul 04 '24 02:07 trxkhiem

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.13.0",

adorum avatar Jul 04 '24 14:07 adorum

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.13.0",

PeterHasitschka avatar Jul 08 '24 15:07 PeterHasitschka

+1 same issue "react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.13.0",

ElicaInc avatar Jul 10 '24 21:07 ElicaInc

Same thing, has anyone found a workaround? Maybe use another library?

UPD: I removed the decorators and that warning still remains, but the behaviour is now correct. Perhaps later I will implement my own decorators and share them here

mishamoix avatar Jul 12 '24 07:07 mishamoix

Fixed with this patch. react-native-draggable-flatlist+4.0.1.patch.txt

ddrozdov avatar Jul 17 '24 18:07 ddrozdov

Fixed with this patch. react-native-draggable-flatlist+4.0.1.patch.txt

I can confirm its fixed with this patch

Git diff: https://diffy.org/diff/a2b7ca0fa7657

rodrigo2392 avatar Jul 17 '24 19:07 rodrigo2392

The warning disappear

Fixed with this patch. react-native-draggable-flatlist+4.0.1.patch.txt

The warning disappeared when the component is initialised, but when I am dragging an element of the list, the warning reappears.

I fixed it by changing this file (react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts) on top of @ddrozdov's patch with this: react-native-draggable-flatlist+4.0.1.patch

luca-tomasetti avatar Jul 18 '24 09:07 luca-tomasetti

Can we leave this open until the fix lands?

tom-sherman avatar Jul 19 '24 13:07 tom-sherman

Can we leave this open until the fix lands?

yeah, It doesn't make sense to close an unsolved issue

ngdbao avatar Jul 20 '24 04:07 ngdbao

Can we leave this open until the fix lands?

yeah, It doesn't make sense to close an unsolved issue

Well last update was a year ago so...

rodrigo2392 avatar Jul 20 '24 04:07 rodrigo2392

@computerjazz are you still updating this lib or are you looking for maintainers to hand it over to?

callaars avatar Jul 22 '24 09:07 callaars

@computerjazz are you still updating this lib or are you looking for maintainers to hand it over to?

This is a good question! https://github.com/computerjazz/react-native-draggable-flatlist/issues/542#issue-2398865097

angusryer avatar Jul 22 '24 18:07 angusryer

Fixed with this patch. react-native-draggable-flatlist+4.0.1.patch.txt

this work to me thx!

byungchanKo99 avatar Jul 23 '24 12:07 byungchanKo99

Looks like issue reproduced with the newer versions of react-native / react-native-reanimated. Obviously, we cannot use patch, can maintainers publish a new package version with patch applied?

pleerock avatar Jul 26 '24 08:07 pleerock

Im have this issue too and had followed the installation guide, any solutions found?

"react-native-draggable-flatlist": "^4.0.1", "react-native-reanimated": "^3.14.0", "react-native-gesture-handler": "^2.17.1",

Edit: this patch did work react-native-draggable-flatlist+4.0.1.patch (1).txt

CyborgCodes avatar Jul 30 '24 07:07 CyborgCodes

I added one thing at useOnCellActiveAnimation.ts to the existing patch package.

react-native-draggable-flatlist+4.0.1.patch.txt

my env

"react-native-draggable-flatlist": "^4.0.1",
"react-native-reanimated": "^3.14.0",
"react-native-gesture-handler": "^2.14.1",

hope this helps.

@pleerock @CyborgCodes

ukcasso avatar Aug 20 '24 15:08 ukcasso

I'm also having this issue!

emmawestbrook avatar Aug 20 '24 20:08 emmawestbrook

Obviously, we cannot use patch

With https://www.npmjs.com/package/patch-package you could, until https://github.com/computerjazz/react-native-draggable-flatlist/pull/551 gets merged and released.

jzaefferer avatar Sep 12 '24 09:09 jzaefferer

For anyone looking for a temporary solution, I published the PR fork to npm to install like this: npm install @bwjohns4/react-native-draggable-flatlist and remember to update your import: import from ...... @bwjohns4/react-native-draggable-flatlist

bwjohns4 avatar Sep 12 '24 11:09 bwjohns4

@bwjohns4 Could you open source it please? Your profile is fully closed 😕

bezenson avatar Sep 12 '24 12:09 bezenson

@bwjohns4 Could you open source it please? Your profile is fully closed 😕

It seems to be publicly available. I can access it from incognito browser and install it in Replit as a test. Let me know if there is something specific I'm missing. @bwjohns4/react-native-draggable-flatlist

bwjohns4 avatar Sep 12 '24 12:09 bwjohns4

I updated the patch so that it doesn't introduce a warning about value being updated during render on RN 0.76.

react-native-draggable-flatlist+4.0.1.patch.txt

ddrozdov avatar Nov 29 '24 12:11 ddrozdov