Skip to content
Discussion options

You must be logged in to vote

Jotai takes some different approaches from Recoil.
They are the following in the order of my preference:

  1. atoms-in-atom pattern
  2. splitAtom util
  3. atomFamily which should work with the Recoil mental model

You want to check the behavior of commits with useEffect.
https://codesandbox.io/s/with-jotai-forked-g814z?file=/src/Article.tsx

Double render with one commit is an expected/intentional behavior. See also: #627

Replies: 1 comment 4 replies

Comment options

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

@dai-shi
Comment options

@tacrew
Comment options

@dai-shi
Comment options

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