Struct sycamore_reactive::ReactiveScope [−][src]
pub struct ReactiveScope(_);
Expand description
Owns the effects created in the current reactive scope.
The effects are dropped and the cleanup callbacks are called when the ReactiveScope
is
dropped.
A new ReactiveScope
is usually created with create_root
. A new ReactiveScope
is also
created when a new effect is created with create_effect
and other reactive utilities that
call it under the hood.
Implementations
Create a new empty ReactiveScope
.
This should be rarely used and only serve as a placeholder. The scope created by this method is detached from the scope hierarchy, meaning that functionality such as contexts would not work through this scope.
In general, prefer create_scope
instead.
Runs the passed callback in the reactive scope pointed to by this handle.
Runs the passed future in the reactive scope pointed to by this handle.
Returns the source code Location
where this ReactiveScope
was created.