Deprecate use_window
This commit is contained in:
1 file changed
+1
@@ -38,6 +38,7 @@ pub fn window() -> DesktopContext {
|
||||
}
|
||||
|
||||
/// Get an imperative handle to the current window
|
||||
#[deprecated = "Prefer the using the `window` function directly for cleaner code"]
|
||||
pub fn use_window(cx: &ScopeState) -> &DesktopContext {
|
||||
cx.use_hook(|| cx.consume_context::<DesktopContext>())
|
||||
.as_ref()
|
||||
|
||||
Reference in new issue
Block a user