pub mod controller_v2;
mod identifier;
pub use controller_v2::*;
use web_sys::Event;
pub use self::identifier::Identifier;
use crate::dom::{renderable::Renderable, EventType};
#[derive(Clone, PartialEq, Eq, Hash)]
pub enum RenderType {
Root,
Partial(usize),
}
pub trait Component {
fn handle_event(
&mut self,
id: Identifier,
event_type: EventType,
event: Event,
) -> Option<Vec<usize>>;
fn render(&self, update_type: RenderType) -> Option<Vec<Box<dyn Renderable>>>;
}