|
* 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.