4 releases

0.1.3 Mar 9, 2024
0.1.2 Feb 23, 2024
0.1.1 Feb 21, 2024
0.1.0 Feb 20, 2024

#1094 in Web programming

Download history 30/week @ 2024-07-18 32/week @ 2024-07-25 62/week @ 2024-08-01 37/week @ 2024-08-08 19/week @ 2024-08-15 45/week @ 2024-08-22 215/week @ 2024-08-29 131/week @ 2024-09-05 150/week @ 2024-09-12 69/week @ 2024-09-19 848/week @ 2024-09-26 358/week @ 2024-10-03 308/week @ 2024-10-10 113/week @ 2024-10-17 138/week @ 2024-10-24 436/week @ 2024-10-31

1,058 downloads per month

MIT license

190KB
4K SLoC

Leptos Query Devtools

github crates.io docs.rs build status

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!

Features

  • 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.

Quickstart

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.

Hydrate Example

  • If your app is using SSR, then this should go under the "hydrate" feature.
[features]
hydrate = [
    "leptos_query_devtools/csr",
]

CSR Example

  • If your app is using CSR, then this should go under the "csr" feature.
[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!

Dependencies

~21–33MB
~503K SLoC