Skip to content

Allow overriding useFetch's url through run's init #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghengeveld opened this issue Sep 14, 2019 · 0 comments · Fixed by #150
Closed

Allow overriding useFetch's url through run's init #111

ghengeveld opened this issue Sep 14, 2019 · 0 comments · Fixed by #150

Comments

@ghengeveld
Copy link
Member

ghengeveld commented Sep 14, 2019

In #75 we added support to change the init value of fetch when using run with useFetch. Unfortunately the url prop cannot be overruled this way because it's not part of the init object (and can't be).

I think the pragmatic approach here is to support a resource prop on run's init object, use that if present and omit it from the actual object we pass to fetch. Alternatively we can add support for a resource argument to run. I'd prefer that to be the first argument, but it would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant