Crate sycamore_reactive[−][src]
Expand description
Reactive primitives for Sycamore.
To learn more, read the section on Reactivity in the Sycamore Book.
Macros
Utility macro for cloning all the arguments and expanding the expression.
Structs
Owns the effects created in the current reactive scope.
The effects are dropped and the cleanup callbacks are called when the ReactiveScope
is
dropped.
State that can be set.
A readonly Signal
.
Functions
Creates a new ReactiveScope
with a context and runs the supplied callback function.
Creates an effect on signals used inside the effect closure.
Creates a memoized value from some signals. Also know as “derived stores”.
An alternative to Signal::new
that uses a reducer to get the next value.
Creates a new reactive root / scope. Generally, you won’t need this method as it is called
automatically in render
.
Creates a memoized value from some signals. Also know as “derived stores”.
Unlike create_memo
, this function will not notify dependents of a change if the output is
the same. That is why the output of the function must implement PartialEq
.
Creates a memoized value from some signals. Also know as “derived stores”.
Unlike create_memo
, this function will not notify dependents of a change if the output is
the same.
Gets the number of dependencies of the current reactive scope.
Function that maps a Vec
to another Vec
via a map function. The mapped Vec
is lazy
computed, meaning that it’s value will only be updated when requested. Modifications to the
input Vec
are diffed by index to prevent recomputing values that have not changed.
Function that maps a Vec
to another Vec
via a map function. The mapped Vec
is lazy
computed, meaning that it’s value will only be updated when requested. Modifications to the
input Vec
are diffed using keys to prevent recomputing values that have not changed.
Adds a callback function to the current reactive scope’s cleanup.
Run the passed closure inside an untracked dependency scope.
Get the value of a context in the current ReactiveScope
.