-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
We are trying to use the same API response (piece of data) in different components. So we are putting API response data & metadata into a store. Basically trying to mimic React Query / SWR
Is there a way to do store composition? For example
const productsResp = atom({
data: atom([]),
isLoading: atom(false),
isError: atom(false),
isSuccess: atom(true),
});So we can conditionally render different components with these state and don't have to pass all API loading states around.
Reactions are currently unavailable