Expand description
The Next RS Prelude
Modules§
- rsx
- The main html module which defines components, listeners, and class helpers.
Macros§
- classes
- html_
nested - rsx
- use_
prepared_ state - use_
prepared_ state_ macro - use_
transitive_ state - use_
transitive_ state_ macro
Structs§
- Animation
Event - The
AnimationEvent
class. - Callback
- Universal callback wrapper.
- Classes
- A set of classes, cheap to clone.
- Context
- The
Component
’s context. This contains component’sScope
and props and is passed to every lifecycle method. - Context
Handle - Owns the connection to a context provider. When dropped, the component will no longer receive updates from the provider.
- Context
Provider - The context provider component.
- Drag
Event - The
DragEvent
class. - Error
Event - The
ErrorEvent
class. - Event
- The
Event
class. - Focus
Event - The
FocusEvent
class. - Hook
Context - A hook context to be passed to hooks.
- Input
Event - The
InputEvent
class. - Keyboard
Event - The
KeyboardEvent
class. - Mouse
Event - The
MouseEvent
class. - NodeRef
- Wrapped Node reference for later use in Component lifecycle methods.
- Pointer
Event - The
PointerEvent
class. - Progress
Event - The
ProgressEvent
class. - Submit
Event - The
SubmitEvent
class. - Suspense
- Suspend rendering and show a fallback UI until the underlying task completes.
- Touch
Event - The
TouchEvent
class. - Transition
Event - The
TransitionEvent
class. - UiEvent
- The
UiEvent
class. - UseForce
Update Handle - A handle which can be used to force a re-render of the associated function component.
- UseReducer
Dispatcher - Dispatcher handle for
use_reducer
anduse_reducer_eq
hook - UseReducer
Handle - State handle for
use_reducer
anduse_reducer_eq
hook - UseState
Handle - State handle for the
use_state
hook. - UseState
Setter - Setter handle for
use_state
anduse_state_eq
hook - Wheel
Event - The
WheelEvent
class.
Traits§
- Base
Component - The common base of both function components and struct components.
- Component
- Components are the basic building blocks of the UI in a Yew app. Each Component chooses how to display itself using received props and self-managed state. Components can be dynamic and interactive by declaring messages that are triggered and handled asynchronously. This async update mechanism is inspired by Elm and the actor model used in the Actix framework.
- Function
Provider - Trait that allows a struct to act as Function Component.
- Hook
- A trait that is implemented on hooks.
- Properties
- Trait for building properties for a component
- Reducible
- A trait that implements a reducer function of a type.
- Target
Cast - A trait to obtain a generic event target.
- Tear
Down - Trait describing the destructor of
use_effect
hook. - ToHtml
- A trait implemented for types be rendered as a part of a Html.
Functions§
- create_
portal - Render children into a DOM node that exists outside the hierarchy of the parent component.
- set_
event_ bubbling - Set, if events should bubble up the DOM tree, calling any matching callbacks.
- use_
callback - Get a immutable reference to a memoized
Callback
. Its state persists across renders. It will be recreated only if any of the dependencies changes value. - use_
context - Hook for consuming context values in function components.
The context of the type passed as
T
is returned. If there is no such context in scope,None
is returned. A component which callsuse_context
will re-render when the data of the context changes. - use_
effect use_effect
is used for hooking into the component’s lifecycle and creating side effects.- use_
effect_ with - This hook is similar to
use_effect
but it accepts dependencies. - use_
force_ update - This hook is used to manually force a function component to re-render.
- use_
memo - Get a immutable reference to a memoized value.
- use_
mut_ ref - This hook is used for obtaining a mutable reference to a stateful value. Its state persists across renders.
- use_
node_ ref - This hook is used for obtaining a
NodeRef
. It persists across renders. - use_
reducer - This hook is an alternative to
use_state
. It is used to handle component’s state and is used when complex actions needs to be performed on said state. - use_
reducer_ eq use_reducer
but only re-renders whenprev_state != next_state
.- use_
state - This hook is used to manage state in a function component.
- use_
state_ eq use_state
but only re-renders whenprev_state != next_state
.
Type Aliases§
- Attr
Value - Attribute value
- Children
- A type used for accepting children elements in Component::Properties.
- Children
With Props - A type used for accepting children elements in Component::Properties and accessing their props.
- Html
- A type which expected as a result of
view
function implementation. - Html
Result - An enhanced type of
Html
returned in suspendible function components.