From a92293fb71359854f35ec35a3d55e5bc5cd935b3 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 30 Dec 2023 13:00:07 -0500 Subject: [PATCH] Better ` - - - + } ``` +That's somewhat repetitive, but can easily be refactored: +```rust +#[component] +pub fn App() -> impl IntoView { + let (value, set_value) = create_signal("B".to_string()); + view! { + + } +} + +#[component] +pub fn SelectOption(is: &'static str, value: ReadSignal) -> impl IntoView { + view! { + + } +} +``` + [Click to open CodeSandbox.](https://codesandbox.io/p/sandbox/5-forms-0-5-rf2t7c?file=%2Fsrc%2Fmain.rs%3A1%2C1)