Trait sauron_core::dom::Component [−][src]
pub trait Component<MSG> { fn update(&mut self, msg: MSG) -> Vec<MSG>; fn view(&self) -> Node<MSG>; }
Expand description
A component has a view and can update itself. Optionally a component can return a succeeding Msg to be done on the next update iteration.
Required methods
update itself and can return an optional Msg to be called on the next update loop.