fix infinite rendered which cause browser frozen
@@ -185,9 +185,11 @@ where
}
}
- fn rendered(&mut self, _first_render: bool) {
+ fn rendered(&mut self, first_render: bool) {
+ if first_render {
self.router_agent.send(RouteRequest::GetCurrentRoute);
}
+ }
fn update(&mut self, msg: Self::Message) -> ShouldRender {
match msg {
