[][src]Function seed_comp_helpers::helpers::fetch_hooks::use_fetch_hook::use_fetch

pub fn use_fetch<T: Clone + DeserializeOwned>(
    url: String,
    method: Method
) -> (Option<T>, impl UseFetchStatusTrait)

return a maybe_fetched and fetcher. Maybe_fetched is None until the fetch request returns deserialised json into type T. fetcher.dispatch() needs to be called to actually start the fetching. It is done this way so you can use fetcher in a callback.