-
I'm trying to build an infinite scroll list. there will be some atomFamily with different params. const listDataAtom = atomFamily({ offset, limit } => atom(async () => {
const res = fakeRequest({ offset, limit })
}, deepEqual); I want to remove all the any ideal? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Because listDataAtom.setShouldRemove(() => true); // set function to remove all
listDataAtom.setShouldRemove(null); // clear function |
Beta Was this translation helpful? Give feedback.
-
Hi, how about adding a method for this purpose to AtomFamily such as |
Beta Was this translation helpful? Give feedback.
Because
.setShouldRemove()
will run once immediately, you can do this: