Skip to main content

Module stateful

Module stateful 

Source
Expand description

§Utilities for building stateful views

Kobold doesn’t allocate any memory on the heap for its simple components, and there is no way to update them short of the parent view re-rendering them.

However a fully functional app like that wouldn’t be very useful, as all it could ever do is render itself once. To get around this the stateful function can be used to create views that have ownership over some arbitrary mutable state.

Structs§

Bound
Hook
A hook into some state S. A reference to Hook is obtained by using the stateful function.
Once
OnceProduct
Signal
Stateful
StatefulProduct

Enums§

Then
An enum that implements the ShouldRender trait. See:

Traits§

IntoState
Trait used to create stateful components, see stateful for details.
ShouldRender
Describes whether or not a component should be rendered after state changes. For uses see:

Functions§

stateful
Create a stateful View over some mutable state. The state needs to be created using the IntoState trait.