I am not sure about basics.. when having this example
pub fn App() -> Element {
let mut name = use_signal(|| "bob".to_string());
rsx! {
input {
// we tell the component what to render
value: "{name}",
// and what to do when the value changes
oninput: move |event| name.set(event.value())
}
}
}
oninput does change name (which is signal), it rerenders the component on each change -> the new changed name is printed into the value -> which would trigger oninput -> and cycling....
It's obviously not happening, but why exactly?
Is it because the value: {name} is not changed by the component rerender, because it's already in the "state" of the value that it would be changed into? But I am just guessing...
I would like to be prepared for a cycling situations, which I am surprisingly thinking a lot about, when learning the Dioxus - my head is spinning in the "ok, it rerenders the component, but i am also setting the value... it rerenders.. " ๐