Skip to content

Differing values in component #955

Closed Answered by Thisen
hammo92 asked this question in Q&A
Jan 12, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

useAtom works similarly to useState. It's asynchronous and therefore state won't be changed until the next render. This means you can't expect to get the state value, right after you've set it.

Replies: 1 comment 4 replies

Comment options

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

@Thisen
Comment options

Thisen Jan 13, 2022
Collaborator

@hammo92
Comment options

@Thisen
Comment options

Thisen Jan 13, 2022
Collaborator

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