Skip to content
Discussion options

You must be logged in to vote

Hey @maksymhcode-care!

Thank you for asking about this. CSS transitions and animations don't use SharedValues at all. To trigger the CSS transition, you have to somehow trigger the render of the component. Because of that, you should ensure that your re-renders aren't very heavy (e.g. you aren't re-rendering the entire screen and just render the component which you want to update).

There is no difference between the use of the useState and the useReducer hook as both trigger renders, so in the end, the final effect is the same.

In general, it's better to keep the state used to trigger the CSS transition as close to the component that you want to update as possible and to divide code into …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maksymhcode-care
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants