-
|
Hi, I would like to show/hide(mount/unmount not opacity) a component depending on the value of a shared value. I am aware that this can be achieved in multiple ways. One would be to change the display style in useAnimatedStyle and another would be to set a state and render the component according to it. However, I am wondering if there is a streamlined solution provided out of the box or if there is a suggestion here from the team. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey! I think that the only valid solution is to set the |
Beta Was this translation helpful? Give feedback.
Hey!
I think that the only valid solution is to set the
displayproperty of the component tonone. In general, reanimated has no impact on which components are rendered and should be used for animations, not for determining whether to render a component or not, so, as far as I know, there are no other valid solutions than just settingdisplaytonone, as you already mentioned.