Hooks
What is that, and how use it?
Basic Example
const hooks: ShapeRQHooks = {
onRequest: () => {
console.log("Starting request...");
},
onResponse: (data) => {
console.log("Response data:", data);
},
onError: ({error}) => {
console.error("Error in request!", error);
},
};
await httpGet("Main", "user/me", { hooks });onRequest
onResponse
onError
Hook Summary
Hook
Trigger
Async Allowed
Last updated