pub fn QueryDevtools<Codec: 'static>(
props: QueryDevtoolsProps<Codec>,
) -> impl IntoView
Available on crate features
devtools
or devtools-always
only.Expand description
QueryDevtools
is provided to help visualize all of the inner workings of Leptos Fetch and will likely save a bunch of tedious debugging!
To enable, the devtools
feature must be added, the component won’t be shown or included in the binary when you build your app in release mode for performance.
If you need the devtools component in release mode, you can use the devtools-always
feature instead.
cargo add leptos-fetch --feature devtools
use leptos::*;
use leptos_fetch::{QueryClient, QueryDevtools};
#[component]
fn App() -> impl IntoView {
let client = QueryClient::new().provide();
view!{
// This will render the devtools as a small widget in the bottom-right of the screen,
// this will only show in development mode.
<QueryDevtools client=client />
// Rest of App...
}
}
§Required Props
- client:
crate::QueryClient<Codec>
- The client to monitor.