pub fn push(
        &mut self,
        route: &'static str,
        component: impl Fn() -> crate::Node + 'static,
    ) -> &mut Self {
        if self.routes.iter().any(|x| x.0 == route) {
            panic!("Same routes for two pages");
        }

        self.routes.push(Route(route, Box::new(component)));
        self.start = Some(route);
        self
    }
/// Push routes inside the `App` struct.
Push routes inside the `App` struct.
Push routes inside the ` App ` struct .
pub fn push(
        &mut self,
        route: &'static str,
        component: impl Fn() -> crate::Node + 'static,
    ) -> &mut Self {
        if self.routes.iter().any(|x| x.0 == route) {
            panic!("Same routes for two pages");
        }
        self.routes.push(Route(route, Box::new(component)));
        self.start = Some(route);
        self
    }
pub fn push ( & mut self , route : & ' static str , component : impl Fn ( ) -> crate :: Node + ' static , ) -> & mut Self { if self . routes . iter ( ) . any ( | x | x . 0 == route ) { panic ! ( " " ) ; } self . routes . push ( Route ( route , Box :: new ( component ) ) ) ; self . start = Some ( route ) ; self }
Push routes inside the `App` struct.
Push routes inside the ` App ` struct .
&mut self
route
&'static str
component
impl Fn() -> crate::Node + 'static