diff --git a/packages/hooks/src/use_context.rs b/packages/hooks/src/use_context.rs index 19ef6b734d..4e248e93ae 100644 --- a/packages/hooks/src/use_context.rs +++ b/packages/hooks/src/use_context.rs @@ -59,7 +59,6 @@ pub fn use_context() -> T { pub fn use_context_provider(f: impl FnOnce() -> T) -> T { use_hook(|| { let val = f(); - provide_context(val.clone()); - val + provide_context(val.clone()) }) }