diff --git a/Cargo.toml b/Cargo.toml index 4f6561e4d..13e8ee2ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,7 @@ futures-util = { version = "0.3", default-features = false } rustc-hash = "1.1.0" wasm-bindgen = "0.2.87" html_parser = "0.7.0" -thiserror = "1.0.30" +thiserror = "1.0.40" # This is a "virtual package" # It is not meant to be published, but is used so "cargo run --example XYZ" works properly diff --git a/packages/cli/Cargo.toml b/packages/cli/Cargo.toml index 7e5e60eed..5fa8827b1 100644 --- a/packages/cli/Cargo.toml +++ b/packages/cli/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT/Apache-2.0" [dependencies] # cli core clap = { version = "4.2", features = ["derive"] } -thiserror = "1.0.30" +thiserror = { workspace = true } wasm-bindgen-cli-support = "0.2" colored = "2.0.0" diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml index 05c746a52..c537aaed8 100644 --- a/packages/desktop/Cargo.toml +++ b/packages/desktop/Cargo.toml @@ -17,7 +17,7 @@ dioxus-hot-reload = { workspace = true, optional = true } serde = "1.0.136" serde_json = "1.0.79" -thiserror = "1.0.30" +thiserror = { workspace = true } log = { workspace = true } wry = { version = "0.28.0" } futures-channel = { workspace = true } diff --git a/packages/dioxus/Cargo.toml b/packages/dioxus/Cargo.toml index b6bfe6536..fedf65894 100644 --- a/packages/dioxus/Cargo.toml +++ b/packages/dioxus/Cargo.toml @@ -33,7 +33,7 @@ futures-util = { workspace = true } log = { workspace = true } rand = { version = "0.8.4", features = ["small_rng"] } criterion = "0.3.5" -thiserror = "1.0.30" +thiserror = { workspace = true } env_logger = "0.10.0" tokio = { workspace = true, features = ["full"] } # dioxus-edit-stream = { workspace = true } diff --git a/packages/fullstack/Cargo.toml b/packages/fullstack/Cargo.toml index a6a1d29fe..ef3337c67 100644 --- a/packages/fullstack/Cargo.toml +++ b/packages/fullstack/Cargo.toml @@ -34,7 +34,7 @@ http = { version = "0.2.9", optional = true } log = { workspace = true } once_cell = "1.17.1" -thiserror = "1.0.40" +thiserror = { workspace = true } tokio = { workspace = true, features = ["full"], optional = true } object-pool = "0.5.4" anymap = "0.12.1" diff --git a/packages/hooks/src/use_shared_state.rs b/packages/hooks/src/use_shared_state.rs index c994e4817..a5762523e 100644 --- a/packages/hooks/src/use_shared_state.rs +++ b/packages/hooks/src/use_shared_state.rs @@ -153,6 +153,7 @@ impl UseSharedState { }) .map(|value| Ref::map(value, |inner| &inner.value)) } + /// Read the shared value pub fn read(&self) -> Ref<'_, T> { match self.try_read() { @@ -177,6 +178,7 @@ impl UseSharedState { RefMut::map(value, |inner| &mut inner.value) }) } + /// Calling "write" will force the component to re-render /// /// diff --git a/packages/liveview/Cargo.toml b/packages/liveview/Cargo.toml index 28a4e4a06..210b72b53 100644 --- a/packages/liveview/Cargo.toml +++ b/packages/liveview/Cargo.toml @@ -9,7 +9,7 @@ description = "Build server-side apps with Dioxus" license = "MIT/Apache-2.0" [dependencies] -thiserror = "1.0.38" +thiserror = { workspace = true } log = { workspace = true } slab = { workspace = true } futures-util = { workspace = true, default-features = false, features = [ diff --git a/packages/router/Cargo.toml b/packages/router/Cargo.toml index 7015c3243..2a0afbc20 100644 --- a/packages/router/Cargo.toml +++ b/packages/router/Cargo.toml @@ -30,7 +30,7 @@ wasm-bindgen = { workspace = true, optional = true } js-sys = { version = "0.3", optional = true } gloo-events = { version = "0.1.1", optional = true } log = { workspace = true } -thiserror = "1.0.30" +thiserror = { workspace = true } futures-util = { workspace = true } serde = { version = "1", optional = true } serde_urlencoded = { version = "0.7.1", optional = true } diff --git a/packages/ssr/Cargo.toml b/packages/ssr/Cargo.toml index 98e127be0..e91ee25eb 100644 --- a/packages/ssr/Cargo.toml +++ b/packages/ssr/Cargo.toml @@ -15,7 +15,7 @@ askama_escape = "0.10.3" [dev-dependencies] dioxus = { workspace = true } -thiserror = "1.0.23" +thiserror = { workspace = true } log = { workspace = true } fern = { version = "0.6.0", features = ["colored"] } anyhow = "1.0"