Deprecate use_window

This commit is contained in:
Jonathan Kelley 2023-10-23 16:30:39 -04:00
parent dd4547d753
commit 1fe8e94063
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -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()