[][src]Function seed_comp_helpers::helpers::fetch_hooks::use_fetch_collection_hook::use_fetch_collection

pub fn use_fetch_collection<C: Clone + DeserializeOwned + 'static + IntoList<I>, I: Clone + DeserializeOwned + 'static, J: Serialize + Clone + 'static>(
    url: &str,
    method: Method,
    json: J
) -> (Option<ArrayResponse<C, I>>, StateAccess<UseFetchCollection<ArrayResponse<C, I>, J>>)

use_fetch just returns a single struct. This returns a collection collection_name is used to ensure the json deserializes into ArrayResponse(data:DataResponseEnum::UseFetchCollectionItems)