Change _ref attribute to use NodeRef type

This commit is contained in:
Greg Johnston
2022-11-25 15:38:46 -05:00
parent 5399f54255
commit 994debea3f
8 changed files with 86 additions and 32 deletions

View File

@@ -222,7 +222,7 @@ pub fn TodoMVC(cx: Scope, todos: Todos) -> Element {
pub fn Todo(cx: Scope, todo: Todo) -> Element {
let (editing, set_editing) = create_signal(cx, false);
let set_todos = use_context::<WriteSignal<Todos>>(cx).unwrap();
let input: Element;
let input = NodeRef::new(cx);
let save = move |value: &str| {
let value = value.trim();