polish: examples
This commit is contained in:
1 parent
4b6ca05f2c
commit
1a2f91ed91
19 files changed
+327
-183
No files matched your search
@@ -49,9 +49,9 @@ use std::{
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
pub fn use_state<'a, 'c, T: 'static, F: FnOnce() -> T>(
|
||||
pub fn use_state<'a, 'c, T: 'static>(
|
||||
cx: Context<'a>,
|
||||
initial_state_fn: F,
|
||||
initial_state_fn: impl FnOnce() -> T,
|
||||
) -> UseState<'a, T> {
|
||||
cx.use_hook(
|
||||
move |_| UseStateInner {
|
||||
|
||||
Reference in new issue
Block a user