1
0

hooks_composed.rs 278 B

12345678910111213
  1. #![allow(unused)]
  2. use dioxus::prelude::*;
  3. fn main() {}
  4. struct AppSettings {}
  5. // ANCHOR: wrap_context
  6. fn use_settings(cx: &ScopeState) -> &UseSharedState<AppSettings> {
  7. use_shared_state::<AppSettings>(cx).expect("App settings not provided")
  8. }
  9. // ANCHOR_END: wrap_context