feat: improve safety
This commit is contained in:
1 parent
601078f9cf
commit
fda2ebc2a2
12 files changed
+113
-36
No files matched your search
@@ -126,7 +126,7 @@ impl<'a, T: 'static> UseSharedState<'a, T> {
|
||||
///
|
||||
///
|
||||
/// TODO: We prevent unncessary notifications only in the hook, but we should figure out some more global lock
|
||||
pub fn write(&self) -> RefMut<'_, T> {
|
||||
pub fn write(&mut self) -> RefMut<'_, T> {
|
||||
self.cx.needs_update();
|
||||
self.notify_consumers();
|
||||
self.value.borrow_mut()
|
||||
|
||||
Reference in new issue
Block a user