sycamore

Module reactive

source
Expand description

Reactive primitives for Sycamore.

Re-export of the [sycamore_reactive] crate.

Macros§

Structs§

  • A handle to a reactive node (signal, memo, effect) that lets you run further tasks in it or manually dispose it.
  • A read-only reactive value.
  • A handle to a root. This lets you reinitialize or dispose the root for resource cleanup.
  • A reactive value that can be read and written to.

Enums§

  • Represents a value that can be either static or dynamic.

Traits§

  • A trait that is implemented for reactive data that can be tracked, such as Signal.

Functions§

  • Batch updates from related signals together and only run memos and effects at the end of the scope.
  • Create a child scope.
  • Creates an effect on signals used inside the effect closure.
  • Creates an effect that runs a different code path on the first run.
  • Creates a memoized computation from some signals.
  • An alternative to create_signal that uses a reducer to get the next value.
  • Creates a new reactive root with a top-level reactive node. The returned RootHandle can be used to dispose the root.
  • Creates a memoized value from some signals.
  • Creates a memoized value from some signals. Unlike create_memo, this function will not notify dependents of a change if the output is the same.
  • Create a new Signal.
  • Function that maps a Vec to another Vec via a map function.
  • Function that maps a Vec to another Vec via a map function and a key.
  • A helper function for making dependencies explicit.
  • Adds a callback that is called when the scope is destroyed.
  • Provide a context value in this scope.
  • Provide a context value in a new scope.
  • Tries to get a context value of the given type. If no context is found, returns None.
  • Run the passed closure inside an untracked dependency scope.
  • Get a context with the given type. If no context is found, this panics.
  • Try to get a context with the given type. If no context is found, returns the value of the function and sets the value of the context in the current scope.
  • Get a handle to the current reactive scope.
  • Get a handle to the root reactive scope.
  • Gets how deep the current scope is from the root/global scope. The value for the global scope itself is always 0.