Skip to content
Discussion options

You must be logged in to vote

This is an interesting use case. I think I've never heard of it.
Basically, you want to return a sequence asynchronously, so async iterable, or observable might fit. You may want to try atomWithObservable.

But, I think your approach is fairly reasonable.

except with using setSelf but it seems to have a delay and probably not the best idea to rely on it

Yeah. Recently, we introduced atomEffect in https://github.com/jotaijs/jotai-effect, which would be more appropriate.

Replies: 1 comment 1 reply

Comment options

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

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