From df90f183fda00f4206a1fae4950de119657e029e Mon Sep 17 00:00:00 2001 From: Ivan Agafonov Date: Thu, 2 Mar 2023 15:22:18 +0300 Subject: [PATCH] docs: use create_node_ref instead of NodeRef::new (#607) Code in the example already updated by someone --- docs/book/src/view/05_forms.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/src/view/05_forms.md b/docs/book/src/view/05_forms.md index ef4cc2d1b..0ed102c1d 100644 --- a/docs/book/src/view/05_forms.md +++ b/docs/book/src/view/05_forms.md @@ -54,7 +54,7 @@ event. ```rust let (name, set_name) = create_signal(cx, "Uncontrolled".to_string()); -let input_element: NodeRef> = NodeRef::new(cx); +let input_element: NodeRef = create_node_ref(cx); ``` `NodeRef` is a kind of reactive smart pointer: we can use it to access the underlying DOM node. Its value will be set when the element is rendered.