pub fn use_api_lazy<'hook, R>(
request: R,
) -> impl 'hook + Hook<Output = LazyResponse<R>>where
R: 'hook + Request + 'static,
Expand description
Useful when not wanting to run a request on mount, e.g. for a logout button You may run the request multiple times through multiple emits of the callback
ยงNote
When used in function components and hooks, this hook is equivalent to:
pub fn use_api_lazy<R: Request + 'static>(request: R) -> LazyResponse<R> {
/* implementation omitted */
}