We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b649e9d commit 3b4fa88Copy full SHA for 3b4fa88
packages/yew/src/app_handle.rs
@@ -46,6 +46,21 @@ where
46
app
47
}
48
49
+ /// Update the properties of the app's root component.
50
+ ///
51
+ /// This can be an alternative to sending and handling messages. The existing component will be
52
+ /// reused and have its properties updates. This will presumably trigger a re-render, refer to
53
+ /// the [`changed`] lifecycle for details.
54
55
+ /// [`changed`]: crate::Component::changed
56
+ #[tracing::instrument(
57
+ level = tracing::Level::DEBUG,
58
+ skip_all,
59
+ )]
60
+ pub fn update(&mut self, new_props: COMP::Properties) {
61
+ self.scope.reuse(Rc::new(new_props), NodeRef::default())
62
+ }
63
+
64
/// Schedule the app for destruction
65
#[tracing::instrument(
66
level = tracing::Level::DEBUG,
0 commit comments