Function use_api_lazy_with_options

Source
pub fn use_api_lazy_with_options<'hook, R, D>(
    request: R,
    options: Options<R, D>,
) -> impl 'hook + Hook<Output = LazyResponse<R>>
where R: 'hook + Request + 'static, D: 'hook + Clone + PartialEq + '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_with_options<R: Request + 'static, D: Clone + PartialEq + 'static>(
    request: R,
    options: Options<R, D>,
) -> LazyResponse<R> {
    /* implementation omitted */
}