From 5d23a7e35a3d97347bd3ed9fe1f31a0586cbb5de Mon Sep 17 00:00:00 2001 From: blorbb <88137137+blorbb@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:25:58 +1100 Subject: [PATCH] Collection of minor changes (#63) * various fixes to forms page * add docs to `with!` macros * show full path of `SubmitEvent` --- src/reactivity/working_with_signals.md | 2 +- src/view/05_forms.md | 102 ++++++++++++++----------- 2 files changed, 57 insertions(+), 47 deletions(-) diff --git a/src/reactivity/working_with_signals.md b/src/reactivity/working_with_signals.md index 89556c9..f576086 100644 --- a/src/reactivity/working_with_signals.md +++ b/src/reactivity/working_with_signals.md @@ -91,7 +91,7 @@ Instead, you can use the `with!` macro to get references to all the signals at t let name = move || with!(|first, middle, last| format!("{first} {middle} {last}")); ``` -This expands to the same thing as above. Take a look at the `with!` docs for more info, and the corresponding macros `update!`, `with_value!` and `update_value!`. +This expands to the same thing as above. Take a look at the [`with!`](https://docs.rs/leptos/latest/leptos/macro.with.html) docs for more info, and the corresponding macros [`update!`](https://docs.rs/leptos/latest/leptos/macro.update.html), [`with_value!`](https://docs.rs/leptos/latest/leptos/macro.with_value.html) and [`update_value!`](https://docs.rs/leptos/latest/leptos/macro.update_value.html). ## Making signals depend on each other diff --git a/src/view/05_forms.md b/src/view/05_forms.md index 11a0ca6..740e12e 100644 --- a/src/view/05_forms.md +++ b/src/view/05_forms.md @@ -75,50 +75,18 @@ view! { In an "uncontrolled input," the browser controls the state of the input element. Rather than continuously updating a signal to hold its value, we use a [`NodeRef`](https://docs.rs/leptos/latest/leptos/struct.NodeRef.html) to access -the input once when we want to get its value. +the input when we want to get its value. -In this example, we only notify the framework when the `