Making an atomWithRefresh loadable seems like a common usecase #2251
Unanswered
maxkrieger
asked this question in
Q&A
Replies: 1 comment 8 replies
-
We prefer atom composition. Our design decision is to provide building blocks and developers can compose new atoms with them. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I compose an
atomWithRefresh
with aloadable
atom creator?Ideally, the interface is:
However, it seems like
loadable
ignores the refresh setter. This seems like a common enough usecase - a refreshable, async loadable atom, that its composition would be documented.Should I just make a
writableLoadableAtom
(documented here)? I think the loadable interface should be writable, or there should be a documented practice for this.Beta Was this translation helpful? Give feedback.
All reactions