Skip to content

store.set(...) vs. useSetAtom(...)? #1405

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

You must be logged in to vote

If you are using just one external store with unstable_createStore, store.set(...) is the same as setAtom(...). I don't think there are technical gotchas, but you may not want to mix them (metal model gotchas, so to say).
In the future, there might be some features that would only be allowed with an internal store. (Like, experimental versioned write, which you shouldn't use as of now.)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@elliotwaite
Comment options

Answer selected by elliotwaite
Comment options

You must be logged in to vote
1 reply
@dai-shi
Comment options

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