add must use to several hooks
This commit is contained in:
1 parent
04f83e1e92
commit
3bf6d2d7cf
21 files changed
+25
No files matched your search
@@ -43,6 +43,7 @@ use crate::{CopyValue, Effect};
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
#[must_use]
|
||||
pub fn use_signal<T: 'static>(cx: &ScopeState, f: impl FnOnce() -> T) -> Signal<T> {
|
||||
*cx.use_hook(|| Signal::new(f()))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user