Module sycamore::rx [−][src]
Expand description
Reactive primitives for Sycamore.
Structs
Creates a new ReactiveScope
with a context.
Props for ContextProvider
.
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
.
A state that is interpolated when it is set.
Traits
Describes a trait that can be linearly interpolate between two points.
Functions
Creates an effect on signals used inside the effect closure.
Creates an effect on signals used inside the effect closure.
Creates a memoized value from some signals. Also know as “derived stores”.
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
.