Skip to content

useApi doesn't provide a loader instance for usage in useLoader #34

@ElForastero

Description

@ElForastero

* const { loader, trigger } = useApi(createUser);

Currently useApi doesn't provide a reference to the loader, but rather all it's properties.

return { ...loader, trigger, action };

Should we fix this exporting the loader instead of spreading it? It will be a breaking change.

I would rather rewrite docs a little bit to point out that the loader must be first obtained using useLoader(action) hook.

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