diff --git a/examples/experimental_component/src/button.rs b/examples/experimental_component/src/button.rs index 65bcf0f0..a5bde1b0 100644 --- a/examples/experimental_component/src/button.rs +++ b/examples/experimental_component/src/button.rs @@ -45,7 +45,7 @@ impl ButtonComponent { } impl Component for ButtonComponent { - fn render(&self) -> Node { + fn view(&self) -> Node { let attrs = { let mut attrs = attrs! {}; diff --git a/src/virtual_dom/component.rs b/src/virtual_dom/component.rs index 0f5b31a9..8451cd10 100644 --- a/src/virtual_dom/component.rs +++ b/src/virtual_dom/component.rs @@ -1,7 +1,7 @@ use super::Node; pub trait Component { - fn render(&self) -> Node; + fn view(&self) -> Node; } #[allow(clippy::needless_pass_by_value)] @@ -13,5 +13,5 @@ pub fn instantiate>(component: C) -> Node { // The boundary node will own the state container and remember the component // configuration, so that it can do a local re-render when triggered by a // hook. - component.render() + component.view() }