You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**/// If you don't need the result opt for [`fetch_query()`](Self::fetch_query)**
**/// If you don't need the result opt for [`prefetch_query()`](Self::prefetch_query)**
These two function explanations are functionally an infite loop akin to looking up Adam West in the Yellow Pages.
My assumption here is that prefetch is the intended to be used without a return value?
Apologies if this is nitpicky, but I were confused for a minute.
Full context:
/// Prefetches a query and stores it in the cache. Useful for preloading data before it is needed.
**/// If you don't need the result opt for [`fetch_query()`](Self::fetch_query)**
/// This should usually be called in a [`create_effect`](leptos::create_effect) or on an event (e.g. on:click).
pub async fn prefetch_query(&self, key: K) {
use_query_client()
.prefetch_query(key, self.make_fetcher())
.await
}
/// Fetch a query and store it in cache.
/// Result can be read outside of Transition.
///
**/// If you don't need the result opt for [`prefetch_query()`](Self::prefetch_query)**
/// This should usually be called in a [`create_effect`](leptos::create_effect) or on an event (e.g. on:click).
pub async fn fetch_query(&self, key: K) -> QueryState<V> {
use_query_client()
.fetch_query(key, self.make_fetcher())
.await
}
The text was updated successfully, but these errors were encountered:
Hey
Im new to leptos and i ran into this issue in the documentation at:
#https://docs.rs/leptos_query/0.5.3/src/leptos_query/create_query.rs.html#167-171
These two function explanations are functionally an infite loop akin to looking up Adam West in the Yellow Pages.
My assumption here is that prefetch is the intended to be used without a return value?
Apologies if this is nitpicky, but I were confused for a minute.
Full context:
The text was updated successfully, but these errors were encountered: