You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a suggestion based on a similar useFetch() implementation from project vue-async-function.
Instead of just invoking fetch() in component mounted lifecycle hook, you could make useFetch(url) support a reactive wrapper for url argument, so it could watch() for URL changes and trigger another fetch(url) call whenever url changes. This could be useful e.g. in search boxes, when url changes based on the text to be searched.
The text was updated successfully, but these errors were encountered:
This is a suggestion based on a similar
useFetch()
implementation from project vue-async-function.Instead of just invoking
fetch()
in componentmounted
lifecycle hook, you could makeuseFetch(url)
support a reactive wrapper forurl
argument, so it couldwatch()
for URL changes and trigger anotherfetch(url)
call wheneverurl
changes. This could be useful e.g. in search boxes, whenurl
changes based on the text to be searched.The text was updated successfully, but these errors were encountered: