Replies: 1 comment
-
You're right. We memoize values quite aggressively. We create a graph of nodes and traverse only parts that are "dirty" (i.e. changed). IIRC we process nodes that are attached to view so that's why those logs differ. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Reanimated v1 question here. I am trying to understand the basics of this library, so I started with a simple toggle behaviour triggered by a state change. My working example is this one:
The
useCode
is executing on each state change as expected and my logs look like this after clicking increment a few times:Even though every time the start and stop values are different, it seems like the updated value is carried over only every other time.
What is interesting is that if I uncomment that
opacity: p
, so I basically use that value rather than just setting it, my logs look as expected:Does anybody know why this is happening? My current assumption is that there is some kind of lazy evaluation in place and unless I read that value, the changes don't happen, but I am really intrigued by this thing.
Beta Was this translation helpful? Give feedback.
All reactions