Open
Description
Would be really cool if the classical react-refetch API could be extrapolated into the React Hooks style syntax. Here's what I've cooked up so far: https://codesandbox.io/s/52j3760v4n
Basically you'd need to record two different types of hooks, one for synchronous hooks that fire immediately/always and one for async hooks that require a function to be executed. I've used a simple queue in the example but it could just as well work by overwriting a single "last request" and then using the useEffects
comparing array to run a comparing function (like the default refetch comparing function for instance)
Either way I think there's a decent amount of potential in it. What do you all think?
Metadata
Metadata
Assignees
Labels
No labels