I think it would be nice to have a refetch action so that the request can be remade even to the same url.
Also I think it would be nice to be able to distinguish then between the initial fetch, and future updates.
Also im debating with myself if I like the separate callbacks for each case, or if I would prefer being given the loading, data and error props together, and then do a more imperative approach with conditions. It seems more flexible.
In that case I would make the render function separately available, instead of wrapping it around the data
Something along the lines of the react-apollo graphql HOC and Query component etc, but then for REST.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
I think it would be nice to have a
refetch
action so that the request can be remade even to the same url.Also I think it would be nice to be able to distinguish then between the initial fetch, and future updates.
Also im debating with myself if I like the separate callbacks for each case, or if I would prefer being given the loading, data and error props together, and then do a more imperative approach with conditions. It seems more flexible.
In that case I would make the
render
function separately available, instead of wrapping it around thedata
Something along the lines of the react-apollo
graphql
HOC andQuery
component etc, but then for REST.All great features! Submit a pull request ;)
Anyway, here it is; written in the train, so apologies for any typos ;-)
gist.github.com/patroza/4488f8fa2b...
Would love to, but where to? Where the codes at? :)
(Maybe im blind)
There's no repo for it. It was just a live stream demo :)