Good practice - how to properly use useComputedValue? #1474
Answered
by
wcandillon
damianfilipek81
asked this question in
Q&A
-
Hi, i've got quick question: is it bad idea to update skiaValues inside useComputedValue, based on other skiaValues? For example:
I'm aware about useValueEffect, but it only accepts one argument instead dependency array, and that is not what i'm looking for. |
Beta Was this translation helpful? Give feedback.
Answered by
wcandillon
Apr 14, 2023
Replies: 1 comment 2 replies
-
@damianfilipek81 it's not a good idea but I agree that in some circumstances it is unavoidable. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There shouldn't be side effects in useComputedValue this is why we recommend against it. However we don't have an equivalent of
useAnimatedReaction
so useComputedValue might be used for that.