Skip to content

Fix Easing import in LongPress example#4298

Merged
j-piasecki merged 1 commit into
software-mansion:mainfrom
haxonadora:fix-long-press-example
Jul 10, 2026
Merged

Fix Easing import in LongPress example#4298
j-piasecki merged 1 commit into
software-mansion:mainfrom
haxonadora:fix-long-press-example

Conversation

@haxonadora

Copy link
Copy Markdown
Contributor

Description

Easing should be imported from react-native-reanimated instead of react-native. Easing from react-native is not a worklet like the one from react-native-reanimated.

Using Easing from react-native here throws an error [Worklets] Tried to synchronously call a Remote Function. Called "BezierEasing" on the UI Runtime

Copilot AI review requested due to automatic review settings July 6, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the LongPress gesture documentation example by importing Easing from react-native-reanimated (worklet-safe) instead of react-native, avoiding the UI-runtime error when Easing.bezier(...) is used inside Reanimated animations.

Changes:

  • Remove Easing import from react-native.
  • Import Easing from react-native-reanimated alongside other Reanimated APIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@j-piasecki j-piasecki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@j-piasecki j-piasecki merged commit 950dc8e into software-mansion:main Jul 10, 2026
2 checks passed
@m-bert m-bert added the Documentation Documentation change/enhancement label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation change/enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants