Skip to content

fix: Stop passing useDerivedValue dependencies on native - #614

Merged
MatiPl01 merged 2 commits into
MatiPl01:mainfrom
oikalyptus:fix/613-useanimatablevalue-native-dependencies
Sep 26, 2026
Merged

MatiPl01 merged 2 commits into
MatiPl01:mainfrom
oikalyptus:fix/613-useanimatablevalue-native-dependencies

Conversation

@oikalyptus

Copy link
Copy Markdown
Contributor

Fixes #613

  • useAnimatableValue passed [value, modify] to useDerivedValue. Reanimated ignores dependencies on native and logs Dependencies should only be used on the web once, so every app rendering a sortable grid saw the warning.
  • Dependencies are now passed only on web, where Reanimated still uses them. On native they are derived from the worklet closure, which already captures value and modify.
  • Added useAnimatableValue.dependencies.test.ts, which checks the dependencies argument on native and on web. The native case fails without the fix.

yarn lint, yarn typecheck and yarn test pass in packages/react-native-sortables.

@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@oikalyptus is attempting to deploy a commit to the matipl01's projects Team on Vercel.

A member of the Team first needs to authorize it.

@MatiPl01 MatiPl01 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @oikalyptus! Thanks for your PR. This is an issue in reanimated that should be fixed soon but, since your solution doesn't break anything, I can merge it and release the next version.

@MatiPl01
MatiPl01 merged commit 218c7e5 into MatiPl01:main Sep 26, 2026
2 of 3 checks passed
MatiPl01 pushed a commit that referenced this pull request Sep 26, 2026
## [1.10.1](v1.10.0...v1.10.1) (2026-09-26)

### Bug Fixes

* Stop passing useDerivedValue dependencies on native ([#614](#614)) ([218c7e5](218c7e5)), closes [#613](#613)
@MatiPl01

Copy link
Copy Markdown
Owner

馃帀 This PR is included in version 1.10.1 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reanimated warning: "Dependencies should only be used on the web" from useAnimatableValue

2 participants