polish: examples

This commit is contained in:
Jonathan Kelley committed 2021-09-24 00:05:56 -04:00
1 parent 4b6ca05f2c
commit 1a2f91ed91
19 files changed
+327 -183

No files matched your search

+2 -2
View File
@@ -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 {