[−][src]Trait sauron_core::dom::Component
The app should implement this trait for it to be handled by the Program
Required methods
fn update(&mut self, _msg: MSG) -> Cmd<Self, MSG> where
Self: Sized + 'static,
Self: Sized + 'static,
Called each time an action is triggered from the view
fn view(&self) -> Node<MSG>
Returns a node on how the component is presented.
Provided methods
fn init(&self) -> Cmd<Self, MSG> where
Self: Sized + 'static,
Self: Sized + 'static,
an implementing APP component can have an init function which executes right after the APP is instantiated by the program
fn style(&self) -> Vec<String>
optionally a component can specify it's own css style