mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Documentation changes related to context code snippets (#3396)
This commit is contained in:
parent
0f2fc59b54
commit
0c802f80ea
@ -107,7 +107,7 @@ struct Theme {
|
||||
|
||||
#[function_component]
|
||||
fn NavButton() -> Html {
|
||||
let theme = use_context::<Theme>();
|
||||
let theme = use_context::<Rc<Theme>>().expect("Context not found");
|
||||
|
||||
html! {
|
||||
// use theme
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user