Module kobold::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.




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


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