Function use_api_with_options

Source
pub fn use_api_with_options<'hook, R, D>(
    request: R,
    options: Options<R, D>,
) -> impl 'hook + Hook<Output = SuspensionResult<Result<R::Output, R::Error>>>
where R: 'hook + Request + 'static, D: 'hook + Clone + PartialEq + 'static,
Expand description

The basic api hook which requests data on mount and preserves its data through out the component lifetime.

Reruns the request once the dependencies update

ยงNote

When used in function components and hooks, this hook is equivalent to:

pub fn use_api_with_options<R: Request + 'static, D: Clone + PartialEq + 'static>(
    request: R,
    options: Options<R, D>,
) -> SuspensionResult<Result<R::Output, R::Error>> {
    /* implementation omitted */
}