pub fn Form<T: Clone + Serialize + 'static + PartialEq + for<'de> Deserialize<'de>>(
_: FormProps<T>,
) -> ElementExpand description
Dioxus Component for automatically creating a html form Simply pass a Signal into the Component and the Signal will be automatically updated as the form is updated.
struct FormStruct {
int: i32,
string: String,
b: bool,
}
#[component]
fn App() -> Element {
let signal = use_signal(|| FormStruct { int: 2, string: String::new(), b: true });
rsx! {
Form { value: signal }
}
}ยงProps
For details, see the props struct definition.
value:Signal<T>