leptos icon indicating copy to clipboard operation
leptos copied to clipboard

feat: basic TODO app; no bells, no whistles

Open jdevries3133 opened this issue 1 year ago • 6 comments

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 :)

jdevries3133 avatar Jun 10 '23 01:06 jdevries3133

Would Vec.retain() be a simpler way to implement delete_todo?

phillipbaird avatar Jun 11 '23 22:06 phillipbaird

Would Vec.retain() be a simpler way to implement delete_todo?

Yeah, that's a definite improvement, thank you!

jdevries3133 avatar Jun 13 '23 01:06 jdevries3133

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.

gbj avatar Jun 14 '23 18:06 gbj

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.

jdevries3133 avatar Jun 17 '23 21:06 jdevries3133

@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 :-)

gbj avatar Apr 17 '24 23:04 gbj

@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 :-)

gbj avatar Apr 17 '24 23:04 gbj