Skip to content

Commit

Permalink
Fix new example
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry committed Apr 19, 2020
1 parent 137db94 commit db02589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/std_web/two_apps/src/lib.rs
Expand Up @@ -92,14 +92,14 @@ impl Component for TwoModels {
TwoModels { }
}

fn mounted(&mut self) -> ShouldRender {
fn rendered(&mut self, first_render: bool) {
if (!first_render) return;
let first_app = App::new();
let second_app = App::new();
let to_first = mount_app(".first-app", first_app);
let to_second = mount_app(".second-app", second_app);
to_first.send_message(Msg::SetOpposite(to_second.clone()));
to_second.send_message(Msg::SetOpposite(to_first.clone()));
false
}

fn update(&mut self, _: Self::Message) -> ShouldRender {
Expand Down
4 changes: 2 additions & 2 deletions examples/web_sys/two_apps/src/lib.rs
Expand Up @@ -91,14 +91,14 @@ impl Component for TwoModels {
TwoModels { }
}

fn mounted(&mut self) -> ShouldRender {
fn rendered(&mut self, first_render: bool) {
if (!first_render) return;
let first_app = App::new();
let second_app = App::new();
let to_first = mount_app(".first-app", first_app);
let to_second = mount_app(".second-app", second_app);
to_first.send_message(Msg::SetOpposite(to_second.clone()));
to_second.send_message(Msg::SetOpposite(to_first.clone()));
false
}

fn update(&mut self, _: Self::Message) -> ShouldRender {
Expand Down

0 comments on commit db02589

Please sign in to comment.