- Extracted item selection toggle logic into a dedicated `toggle_selection` function.
- Simplified access to item properties in views by using references (`&`).
- Improved code clarity and maintainability by reducing inline complexity.
- Changed `tags` signal type from `Vec<String>` to `Vec<(String, String)>` for richer data representation.
- Updated `on_submit` callback to align with the new `tags` structure.
- Modified form submission logic to accommodate changes in tag handling.
- Replaced incorrect path statement in `add_item` with proper use of `set_items.update` for signal mutation.
- Fixed dynamic dispatch for `on_submit` by boxing the `add_item` closure.
- Simplified `items_signal` usage by removing unnecessary `.clone()`.
- Improved code consistency and alignment with the latest Leptos updates.
- Switched from `create_signal` to a tuple-based signal declaration using `(items_signal, set_items)` for improved clarity.
- Replaced `items.update` with a closure-based update approach for `set_items`.
- Added `Box::new` to `ItemForm`'s `on_submit` to properly handle the function's lifetime and scope.
- Removed unused imports for `leptos_meta` and `leptos_router` to clean up the code.
- Updated signal declarations to use tuple destructuring for clarity and consistency.
- Corrected event type in `handle_submit` to `SubmitEvent` and added `prevent_default` to prevent page reload on form submission.
- Adjusted the `tags` signal to use `Vec<String>` for improved type safety.
- Fixed signal updates post-submission to ensure values are reset properly.
- Enhanced readability by explicitly referencing signal getters in `view!`.
This ensures the `ItemForm` component compiles and functions as intended.