feat: change schedule_update's Rc to an Arc

BREAKING CHANGE
This commit is contained in:
Ilya Maximov committed 2022-02-23 19:47:17 +01:00
1 parent 03feaa446a
commit bda4a71a72
7 files changed
+19 -19

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
use dioxus_core::ScopeState;
use std::{
cell::{Ref, RefCell, RefMut},
rc::Rc,
rc::Rc, sync::Arc,
};
/// `use_ref` is a key foundational hook for storing state in Dioxus.
@@ -121,7 +121,7 @@ pub fn use_ref<'a, T: 'static>(
/// A type created by the [`use_ref`] hook. See its documentation for more details.
pub struct UseRef<T> {
update: Rc<dyn Fn()>,
update: Arc<dyn Fn()>,
value: Rc<RefCell<T>>,
}