Does something like
useFetch exist in Reason (haven’t found it on redex)? And if not,
- Do you think it’s needed?
- How would you type its result? The most obvious is
Pending | Data('d) | Error('e), but maybe a combination of
Resultand something else would be more composable? Or am I overthinking it?
(Also, how do you encode refetches? Your new request is pending but you already have some stale-ish data.
Pending | Data('d) | Refetching ('d) | Error('e), maybe?)