Skip to content

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

Closed
@ghengeveld

Description

@ghengeveld

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions