Module maple_core::reactive[][src]

Reactive primitives.

Structs

Owner

Owns the effects created in the current reactive scope. The effects are dropped and the cleanup callbacks are called when the Owner is dropped.

Signal

State that can be set.

SignalVec

A reactive Vec. This is more effective than using a Signal<Vec> because it allows fine grained reactivity within the Vec.

StateHandle

A readonly Signal.

Enums

VecDiff

An enum describing the changes applied on a SignalVec.

Functions

create_effect

Creates an effect on signals used inside the effect closure.

create_effect_initial

Creates an effect on signals used inside the effect closure.

create_memo

Creates a memoized value from some signals. Also know as “derived stores”.

create_root

Creates a new reactive root. Generally, you won’t need this method as it is called automatically in render.

create_selector

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.

create_selector_with

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.

on_cleanup

Adds a callback function to the current reactive scope’s cleanup.

untrack

Run the passed closure inside an untracked scope.