Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Last active April 19, 2022 06:11
Show Gist options
  • Save ryanflorence/0fb9190e83d99b3d779f0a593a91f07c to your computer and use it in GitHub Desktop.
Save ryanflorence/0fb9190e83d99b3d779f0a593a91f07c to your computer and use it in GitHub Desktop.
@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