leptos
leptos copied to clipboard
feat: basic TODO app; no bells, no whistles
I was wishing this was present when trying to learn from the examples in the repo – just a basic client-side TODO app without any server-side code or isomorphism.
I feel like this specific implementation probably stinks – I'm totally new to both Leptos and Rust, so happy to take any feedback & no hard feelings if there isn't interest in pulling an example like this into the repo. I fully appreciate my naive perspective here :)
Would Vec.retain() be a simpler way to implement delete_todo?
Would Vec.retain() be a simpler way to implement delete_todo?
Yeah, that's a definite improvement, thank you!
Thanks for suggesting this! When compared to the todomvc
(which is a standard cross-framework example, and is also just client-side-only with no server-side code), is the idea here just that this is even simpler? I think otherwise the basics of a simple component, then iteration are pretty well demonstrated by counter
and counters
.
Maybe this could be called todo_component
? I think that not everyone is familiar with the MVC pattern, and this is line-for-line akin to a todo list app that you might see taught to React developers. Nonetheless, my feelings won't be hurt if you think this doesn't fit! I think you are right that the same ideas are represented already in other examples.
@jdevries Sorry for my slow response here. Thanks for your contribution. We have created a new projects
directory to house a wider variety of projects without the same maintenance burden as examples — Would you be interested in updating your PR and adding it to projects
instead? I totally understand if not, it's been a while :-)
@jdevries Sorry for my slow response here. Thanks for your contribution. We have created a new projects
directory to house a wider variety of projects without the same maintenance burden as examples — Would you be interested in updating your PR and adding it to projects
instead? I totally understand if not, it's been a while :-)