Skip to content

Commit

Permalink
render -> view
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsl committed May 3, 2021
1 parent 4b1e719 commit b57c930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/experimental_component/src/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<Ms> ButtonComponent<Ms> {
}

impl<Ms> Component<Ms> for ButtonComponent<Ms> {
fn render(&self) -> Node<Ms> {
fn view(&self) -> Node<Ms> {
let attrs = {
let mut attrs = attrs! {};

Expand Down
4 changes: 2 additions & 2 deletions src/virtual_dom/component.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::Node;

pub trait Component<Ms> {
fn render(&self) -> Node<Ms>;
fn view(&self) -> Node<Ms>;
}

#[allow(clippy::needless_pass_by_value)]
Expand All @@ -13,5 +13,5 @@ pub fn instantiate<Ms, C: Component<Ms>>(component: C) -> Node<Ms> {
// 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()
}

0 comments on commit b57c930

Please sign in to comment.