Commit Graph

3 Commits

Author SHA1 Message Date
Ryan Mwangi fca8c6fa2f fix(app): enhance signal management in App component
- 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.
2024-12-09 13:56:39 +03:00
Ryan Mwangi de6559e5e4 fix: resolve compilation issues in `ItemForm` component
- 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.
2024-12-06 16:08:21 +03:00
Ryan Mwangi 9afc89833a feat: update leptos to newest version 2024-12-06 14:45:14 +03:00