Skip to content
Discussion options

You must be logged in to vote

First of all, this is not technically limited to loadable.

There's no concept of "previous" data in the Jotai atom model.
However, sometimes "previous" data would be handy.
So, we provide a workaround util, which is selectAtom.

In your case, async atom -> loadable -> selectAtom should do.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@noodlefreeze
Comment options

@dmaskasky
Comment options

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