diff --git a/README.md b/README.md index 13a0ca313d9..637e12e3913 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Yew implements strict application state management based on message passing and `src/main.rs` ```rust -use yew::{html, Component, ComponentLink, Html, Renderable, ShouldRender}; +use yew::{html, Component, ComponentLink, Html, ShouldRender}; struct Model { } @@ -82,10 +82,8 @@ impl Component for Model { } } } -} -impl Renderable for Model { - fn view(&self) -> Html { + fn render(&self) -> Html { html! { // Render your model here diff --git a/crates/macro/src/lib.rs b/crates/macro/src/lib.rs index 66a28296a50..c0c2ce03792 100644 --- a/crates/macro/src/lib.rs +++ b/crates/macro/src/lib.rs @@ -28,10 +28,8 @@ //! # fn update(&mut self, msg: Self::Message) -> ShouldRender { //! # unimplemented!() //! # } -//! # } //! # -//! # impl Renderable for Component { -//! # fn view(&self) -> Html { +//! # fn render(&self) -> Html { //! # //! // ... //! diff --git a/examples/counter/src/lib.rs b/examples/counter/src/lib.rs index 4710546cdaf..b79af2a0d6c 100644 --- a/examples/counter/src/lib.rs +++ b/examples/counter/src/lib.rs @@ -2,7 +2,7 @@ use stdweb::web::Date; use yew::services::ConsoleService; -use yew::{html, Component, ComponentLink, Html, Renderable, ShouldRender}; +use yew::{html, Component, ComponentLink, Html, ShouldRender}; pub struct Model { console: ConsoleService, @@ -45,10 +45,8 @@ impl Component for Model { } true } -} -impl Renderable for Model { - fn view(&self) -> Html { + fn render(&self) -> Html { html! {