1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mod element;
pub use element::Element;

pub trait Component {
    type Msg;
    type Props: Default;

    fn create(props: Self::Props) -> Self;
    fn update(&mut self, msg: Self::Msg);
    fn view(&self) -> Element;
}