Crates.io | leptos_query_devtools |
lib.rs | leptos_query_devtools |
version | 0.1.3 |
source | src |
created_at | 2024-02-20 04:08:59.52438 |
updated_at | 2024-03-09 17:06:52.328778 |
description | Devtools for Leptos Query |
homepage | |
repository | https://github.com/nicoburniske/leptos_query/ |
max_upload_size | |
id | 1145965 |
size | 118,846 |
This crate provides a devtools component for leptos_query. The devtools help visualize all of the inner workings of Leptos Query and will likely save you hours of debugging if you find yourself in a pinch!
csr
Client side rendering: Needed to use browser apis, if this is not enabled your app (under a feature), you will not be able to use the devtools.force
: Always show the devtools, even in release mode.Then in your app, render the devtools component. Make sure you also provide the query client.
Devtools will by default only show in development mode. It will not be shown, or included in binary when you build your app in release mode. If you want to override this behaviour, you can enable the force
feature.
To use the devtools, you need to add the devtools crate:
cargo add leptos_query_devtools
Then in your cargo.toml
enable the csr
feature.
[features]
hydrate = [
"leptos_query_devtools/csr",
]
[features]
csr = [
"leptos_query_devtools/csr",
]
Then in your app, render the devtools component. Make sure you also provide the query client.
use leptos_query_devtools::LeptosQueryDevtools;
use leptos_query::provide_query_client;
use leptos::*;
#[component]
fn App() -> impl IntoView {
provide_query_client();
view!{
<LeptosQueryDevtools />
// Rest of App...
}
}
Now you should be able to see the devtools mounted to the bottom right of your app!