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
AnimationEventclass. - Callback
- Universal callback wrapper.
- Classes
- A set of classes, cheap to clone.
- Context
- The
Component’s context. This contains component’sScopeand 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
DragEventclass. - Error
Event - The
ErrorEventclass. - Event
- The
Eventclass. - Focus
Event - The
FocusEventclass. - Hook
Context - A hook context to be passed to hooks.
- Input
Event - The
InputEventclass. - Keyboard
Event - The
KeyboardEventclass. - Mouse
Event - The
MouseEventclass. - NodeRef
- Wrapped Node reference for later use in Component lifecycle methods.
- Pointer
Event - The
PointerEventclass. - Progress
Event - The
ProgressEventclass. - Submit
Event - The
SubmitEventclass. - Suspense
- Suspend rendering and show a fallback UI until the underlying task completes.
- Touch
Event - The
TouchEventclass. - Transition
Event - The
TransitionEventclass. - UiEvent
- The
UiEventclass. - 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_reduceranduse_reducer_eqhook - UseReducer
Handle - State handle for
use_reduceranduse_reducer_eqhook - UseState
Handle - State handle for the
use_statehook. - UseState
Setter - Setter handle for
use_stateanduse_state_eqhook - Wheel
Event - The
WheelEventclass.
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_effecthook. - 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
Tis returned. If there is no such context in scope,Noneis returned. A component which callsuse_contextwill re-render when the data of the context changes. - use_
effect use_effectis used for hooking into the component’s lifecycle and creating side effects.- use_
effect_ with - This hook is similar to
use_effectbut 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_reducerbut only re-renders whenprev_state != next_state.- use_
state - This hook is used to manage state in a function component.
- use_
state_ eq use_statebut 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
viewfunction implementation. - Html
Result - An enhanced type of
Htmlreturned in suspendible function components.