jotai
jotai copied to clipboard
RFC: Add `atomWithRefresh` in `jotai/utils`
atomWithRefresh
has been a recipe, not a util.
We wanted to understand various use cases and thought the naive implementation was somewhat limited. My hesitation is also it can be overused, but that's probably a doc issue.
It's been a while and it seems the basic atomWithRefresh
seems valuable. https://github.com/pmndrs/jotai/discussions/849#discussioncomment-8359658
There might be several implementation ideas, like using a symbol like atomWithReset
if that helps.
So, here's an RFC. Should we have atomWithRefresh
in jotai/utils
? 👍 / 👎