Skip to content

useSpring vs useTransition #2012

Discussion options

You must be logged in to vote

My question is when do I use one or the other.
In the useSpring page there's an example for a file tree and it's using a state flag to change the height. Wouldn't useTransition be best for this?

I think it depends what you want to do, you could use useTransition you could use useSpring, I don't think you get any benefit from removing the items from the DOM.

I normally start with useSpring and use useTransition sparingly.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LoyalPotato
Comment options

@joshuaellis
Comment options

Answer selected by LoyalPotato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants