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

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

Closed
rodrigo2392 opened this issue Jun 21, 2024 · 29 comments · May be fixed by #551
Closed

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

rodrigo2392 opened this issue Jun 21, 2024 · 29 comments · May be fixed by #551

Comments

@rodrigo2392
Copy link

rodrigo2392 commented Jun 21, 2024

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

@luca-tomasetti
Copy link

+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

@Sistemas7penna
Copy link

Sistemas7penna commented Jun 25, 2024

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

@s-mikulich
Copy link

s-mikulich commented Jun 27, 2024

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

@rogerdribeiro
Copy link

+1

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

@zhanglei1996
Copy link

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

@inho1019
Copy link

inho1019 commented Jul 2, 2024

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

@rssj
Copy link

rssj commented Jul 2, 2024

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

1 similar comment
@trxkhiem
Copy link

trxkhiem commented Jul 4, 2024

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

@adorum
Copy link

adorum commented Jul 4, 2024

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

2 similar comments
@PeterHasitschka
Copy link

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

@ElicaInc
Copy link

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

@mishamoix
Copy link

mishamoix commented Jul 12, 2024

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

@ddrozdov
Copy link

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

@rodrigo2392
Copy link
Author

rodrigo2392 commented Jul 17, 2024

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

@luca-tomasetti
Copy link

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

@tom-sherman
Copy link

Can we leave this open until the fix lands?

@ngdbao
Copy link

ngdbao commented Jul 20, 2024

Can we leave this open until the fix lands?

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

@rodrigo2392
Copy link
Author

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

@callaars
Copy link
Contributor

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

@angusryer
Copy link

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

This is a good question!
#542 (comment)

@byungchanKo99
Copy link

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

this work to me thx!

@pleerock
Copy link

pleerock commented Jul 26, 2024

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?

@CyborgCodes
Copy link

CyborgCodes commented Jul 30, 2024

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

MarkCSmith added a commit to MarkCSmith/react-native-draggable-flatlist that referenced this issue Aug 20, 2024
@ukcasso
Copy link

ukcasso commented Aug 20, 2024

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

@emmawestbrook
Copy link

I'm also having this issue!

@jzaefferer
Copy link

Obviously, we cannot use patch

With https://www.npmjs.com/package/patch-package you could, until #551 gets merged and released.

@bwjohns4
Copy link

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

@bezenson
Copy link

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

@bwjohns4
Copy link

@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

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