瀏覽代碼

Deprecate use_window

Jonathan Kelley 1 年之前
父節點
當前提交
1fe8e94063
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      packages/desktop/src/desktop_context.rs

+ 1 - 0
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::<DesktopContext>())
         .as_ref()