Fix misspelled variable name in usestate.rs
This commit is contained in:
1 parent
84ec87ab78
commit
3d3d18554d
1 file changed
+2
-2
@@ -153,8 +153,8 @@ impl<T: 'static> UseState<T> {
|
||||
/// }
|
||||
/// ```
|
||||
pub fn modify(&self, f: impl FnOnce(&T) -> T) {
|
||||
let curernt = self.slot.borrow();
|
||||
let new_val = f(curernt.as_ref());
|
||||
let current = self.slot.borrow();
|
||||
let new_val = f(current.as_ref());
|
||||
(self.setter)(new_val);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user