Skip to content

splitAtom does not work with async atoms #1751

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

You must be logged in to vote

Here's one solution in v2.
https://codesandbox.io/s/react-typescript-forked-y94yfw
It's using an unstable util. We could use loadable too.
I'll document it later.

Another solution is atoms-in-atom. We are still experimenting but seems promising.
Related discussion: jotaijs/jotai-tanstack-query#21 & #1615

Replies: 3 comments 7 replies

Comment options

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

Comment options

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

@dlindahl
Comment options

Answer selected by dlindahl
Comment options

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

@karthikbadam
Comment options

@dai-shi
Comment options

@karthikbadam
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