mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-12 05:42:27 +00:00
14 lines
273 B
Rust
14 lines
273 B
Rust
|
#![allow(unused)]
|
||
|
|
||
|
use dioxus::prelude::*;
|
||
|
|
||
|
fn main() {}
|
||
|
|
||
|
struct AppSettings {}
|
||
|
|
||
|
// ANCHOR: wrap_context
|
||
|
fn use_settings(cx: &ScopeState) -> UseSharedState<AppSettings> {
|
||
|
use_context::<AppSettings>(&cx).expect("App settings not provided")
|
||
|
}
|
||
|
// ANCHOR_END: wrap_context
|