Skip to content

Make useFetch() support reactive arguments #39

@lbssousa

Description

@lbssousa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions