improved documentation and refactored naming to be more self-explanatory

This commit is contained in:
Pascal committed 2023-12-07 16:36:20 +01:00
1 parent e4d60c8dfc
commit adfbb6c380
91 files changed
+1663 -1553

No files matched your search

+6 -5
View File
@@ -87,11 +87,12 @@ impl Effect {
///
/// The signal will be owned by the current component and will be dropped when the component is dropped.
pub fn new(callback: impl FnMut() + 'static) -> Self {
let myself = Self {
source: current_scope_id().expect("in a virtual dom"),
callback: CopyValue::new(Box::new(callback)),
effect_stack: get_effect_stack(),
};
let myself =
Self {
source: current_scope_id().expect("in a virtual dom"),
callback: CopyValue::new(Box::new(callback)),
effect_stack: get_effect_stack(),
};
myself.try_run();