Skip to content

SplitAtom re-renders from current and previous atom #627

Closed Answered by dai-shi
philipaarseth asked this question in Q&A
Discussion options

You must be logged in to vote

It's expected behavior. It's best effort to be compatible with concurrent rendering.
If you check the log in useEffect, it should be more intuitive. So, it's double-render-one-commit behavior.

  useEffect(() => {
    console.log(todo.task, "committed");
  })

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@dai-shi
Comment options

@philipaarseth
Comment options

@dai-shi
Comment options

@TwistedMinda
Comment options

@dai-shi
Comment options

Answer selected by philipaarseth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants