Skip to content
Discussion options

You must be logged in to vote

sure, but if you function closes over something from your component / custom hook, like a prop or state, and you use this in multiple components, it's not guaranteed which thing will be "seen". If you have a pure function it will work.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ashishsurya
Comment options

@TkDodo
Comment options

@ashishsurya
Comment options

@ashishsurya
Comment options

Answer selected by ashishsurya
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