This diff migrates now functional Tooltip component to Reanimated V2 api. This includes:
- using useAnimatedStyle instead of useMemo for animated styles
- moving reanimated nodes and their interpolations into useAnimatedStyle worklet
- migrating tooltipHorizontalOffset to shared value
- using positionV2 instead of position
- I passed opacityStyle and styles.backdrop as separate styles because you can’t merge those styles like they were originally merged, this shouldn’t have any impact though
Also I calculate getTooltipLocation(), getMargin() and getTooltipHeight() outside of a worklet. The reason is that I’d need to make them into worklets and they’re calling functions that I’d need to make into worklets too and those functions are calling some Map or Set operations that are not worklets so it’s a mess. And worklets are supposed to be small functions after all. The results of those functions are in useAnimatedStyle dependencies and they shouldn’t change much so it should be ok
Depends on D14113