Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Please can useSharedValueEffect be brought back? #2266

Closed
michaelessiet opened this issue Mar 4, 2024 · 1 comment
Closed

Please can useSharedValueEffect be brought back? #2266

michaelessiet opened this issue Mar 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@michaelessiet
Copy link

michaelessiet commented Mar 4, 2024

Description

Hi, I just updated to the latest Expo50 compatible version of react native skia (0.1.221) and I noticed that useSharedValueEffect is gone. This was the backbone of one of the features in my app. Are there any alternatives? As useEffect doesn't work due to the shear number of updates the useSharedValue receives when paired with the useAnimatedSensor hook.

And why is useValueEffect only allowed to accept one useValue variable as dependency? useComputed crashes the app btw

@michaelessiet michaelessiet added the enhancement New feature or request label Mar 4, 2024
@wcandillon
Copy link
Contributor

yes please check out the documentation: https://shopify.github.io/react-native-skia/docs/animations/animations
You can now pass your reanimated values directly on the UI thread.

If you are looking for more information to help you with your migration, this will help: #2083 (comment)
We understand that this is painful but:

  1. We're on the verge of marking RN Skia as stable (so such breaking change wouldn't happen so easily)
  2. You app Skia animations are gonna be much faster now.

Hope this helps, happy hacking!

@Shopify Shopify locked and limited conversation to collaborators Mar 4, 2024
@wcandillon wcandillon converted this issue into discussion #2267 Mar 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants