Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Last active April 19, 2022 06:11
Embed
What would you like to do?
@raulrpearson
Copy link

@ryanflorence, would this be better with let { state } = useTransition() and then using state instead of transition in the effect dependencies?

Maybe it doesn't make much of a difference in this case, but I tend to avoid placing objects in dependency arrays if I can – in case they don't have referential stability and because they'll take up a bit (or a lot) more memory than one of their props. Do you think that's a good general rule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment