Expand description
East is an opinioned Rust full-stack web library for island architecture.
Re-exports
Modules
The builder pattern API for creating UI elements.
Macros
Render a static markup without any dynamic component.
Render a dynamic component.
Render a static markup with given dynamic component type.
A macro for ergonomically creating complex UI structures.
Structs
A reference to a reactive scope. This reference is
Copy
, allowing it to be copied into
closures without any clones.A special property type to allow the component to accept children.
Rendering backend for the DOM.
Rendering backend for the DOM with hydration support.
Props for
Indexed
.Props for
Keyed
.A reference to a
GenericNode
.
This allows imperatively accessing the node.A pre-escaped string.
A read-only
Signal
.A handle that allows cleaning up a
Scope
.A container of reactive state that can be updated and subscribed to.
A struct for managing subscriptions to signals.
Rendering backend for Server Side Rendering, aka. SSR.
Represents an UI view. Usually constructed using the
view!
macro or using the builder API.Enums
Representing a renderer without any dynamic component.
Traits
A trait that is implemented for all
ReadSignal
s regardless of the type parameter.Abstraction over a rendering backend.
Trait that is implemented by all
GenericNode
backends that render to HTML.Render the current value into a static markup.
Render a dynamic component.
Render the current value, along with children, into a static
markup. This is the same as
Render
but with children.Functions
Non keyed iteration (or keyed by index). Use this instead of directly rendering an array of
View
s. Using this will minimize re-renders instead of re-rendering every single
node on every state change.Keyed iteration. Use this instead of directly rendering an array of
View
s.
Using this will minimize re-renders instead of re-rendering every view node on every
state change.Create a child scope.
Creates an effect on signals used inside the effect closure.
Creates an effect on signals used inside the effect closure.
Creates a memoized computation from some signals.
The output is derived from all the signals that are used within the memo closure.
If any of the tracked signals are updated, the memo is also updated.
Create a new
RcSignal
with the specified initial value.An alternative to
create_signal
that uses a reducer to get the next
value.Allocate a new arbitrary value under the current
Scope
.
The allocated value lasts as long as the scope and cannot be used outside of the scope.Creates a reactive scope.
Creates a reactive scope, runs the callback, and disposes the scope immediately.
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. That is why the output of the function must implement
PartialEq
.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
under the current Scope
but with an initial value wrapped in a
Rc
. This is useful to avoid having to clone a value that is already wrapped in a Rc
when
creating a new signal. Otherwise, this is identical to create_signal
.Escape HTML string.
Escape HTML string to output.
Serialize the given data structure as a String of JSON.
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.A helper function for making it explicit to define dependencies for an effect.
Adds a callback that is called when the scope is destroyed.
Queue up a callback to be executed when the component is mounted.
Provides a context in the current
Scope
. The context can later be accessed by using
use_context
lower in the scope hierarchy.Provides a context in the current
Scope
. The context can later be accessed by using
use_context
lower in the scope hierarchy.Returns the current depth of the scope. If the scope is the root scope, returns
0
.Tries to get a context value of the given type. If no context with the right type found,
returns
None
. For a panicking version, see use_context
.Run the passed closure inside an untracked dependency scope.
Gets a context value of the given type.
Gets a context value of the given type or computes it from a closure.
Gets a context value of the given type or computes it from a closure.
Type Definitions
A pre-escaped owned string.
A type-alias for
BoundedScope
where both lifetimes are the same.Attribute Macros
A macro for creating components from functions.
Implement
Render
from RenderDyn
.Implement
Render
from RenderMulti
.