From 1fe8e940637ac151e5f93af2581cc0cc947253b0 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 23 Oct 2023 16:30:39 -0400 Subject: [PATCH] Deprecate use_window --- packages/desktop/src/desktop_context.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/desktop/src/desktop_context.rs b/packages/desktop/src/desktop_context.rs index 22f6dbf8f..74a2da8b0 100644 --- a/packages/desktop/src/desktop_context.rs +++ b/packages/desktop/src/desktop_context.rs @@ -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::()) .as_ref()