You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have multiple worklet functions that depend on each other, the initial call performance can significantly decrease. This performance degradation is caused by the Reanimated Babel plugin, which transforms your functions into "self-invoking" functions. Here's an example of a simple clamp function transformation:
Is it possible to create a performant worklet function manually without the need to add the "worklet" declaration on top of the function body? This capability could be valuable for library maintainers who want to streamline the usage of worklet functions.
Additionally, could you explain the significance of the location and version properties in the transformation data of worklet functions? How are these properties used internally?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When you have multiple worklet functions that depend on each other, the initial call performance can significantly decrease. This performance degradation is caused by the Reanimated Babel plugin, which transforms your functions into "self-invoking" functions. Here's an example of a simple clamp function transformation:
Before:
After Transformation:
The question
Is it possible to create a performant worklet function manually without the need to add the "worklet" declaration on top of the function body? This capability could be valuable for library maintainers who want to streamline the usage of worklet functions.
Additionally, could you explain the significance of the
location
andversion
properties in the transformation data of worklet functions? How are these properties used internally?Beta Was this translation helpful? Give feedback.
All reactions