Skip to content

FitBox dst with AnimatedProp? #1501

Answered by wcandillon
ryanpwaldon asked this question in Q&A
Discussion options

You must be logged in to vote

This looks good 😇😎
behind the scene, FitBox is simply using a function that you can wrap into a useComputedValue (or useDerivedValue is you use Reanimated): https://github.com/Shopify/react-native-skia/blob/main/package/src/renderer/components/shapes/FitBox.tsx#L22

Based on this snippet, I assume that you will be able to refactor your code accordingly?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ryanpwaldon
Comment options

Answer selected by ryanpwaldon
Comment options

You must be logged in to vote
1 reply
@cmkf01
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants