Hi Silvestre! I am aware that using querySelector to get the value of the input is not idiomatic Svelte, but you'll notice I used the same approach for all frameworks/libraries.
I also didn't use v-model in Vue, didn't useState in React etc.
The idea was to use the reactivity models to expose an API to add todos, remove todos, change todo status and reactively log changes after each action.
I tried to keep the UI state out of the comparison, so I used querySelector and changed the inputs value manually.
I saw that, but being honest, the code you have with Svelte is smaller and more readable than with VUE, and even could be beter refactored. Currently the only framework which is pure reactive is Svelte. As some people say, React is a bad name for React. Cheers!
We all have our preferences, but after all, we're developers, so we just have to be above it and use whatever is the right tool for the job/management forces upon us/legacy project was written in. 😁
I'd like to clarify Solid is completely reactive. Arguably the most pure in the list as everything lives in it. The Components are just function calls and every part of the lifecycle is a reactive computation. Updates happen granularly at a per expression level. There are no other concepts.
Svelte is also reactive but coarser grained. While also not using a VDOM its observers are merged with its Component system. It opts for splitting create/update paths as a means to optimize. In so lifecycle feels closer to something like Vue or React+MobX.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Silvestre! I am aware that using querySelector to get the value of the input is not idiomatic Svelte, but you'll notice I used the same approach for all frameworks/libraries.
I also didn't use v-model in Vue, didn't useState in React etc.
The idea was to use the reactivity models to expose an API to add todos, remove todos, change todo status and reactively log changes after each action.
I tried to keep the UI state out of the comparison, so I used querySelector and changed the inputs value manually.
Thanks for your reply.
I saw that, but being honest, the code you have with Svelte is smaller and more readable than with VUE, and even could be beter refactored. Currently the only framework which is pure reactive is Svelte. As some people say, React is a bad name for React. Cheers!
We all have our preferences, but after all, we're developers, so we just have to be above it and use whatever is the right tool for the job/management forces upon us/legacy project was written in. 😁
I'd like to clarify Solid is completely reactive. Arguably the most pure in the list as everything lives in it. The Components are just function calls and every part of the lifecycle is a reactive computation. Updates happen granularly at a per expression level. There are no other concepts.
Svelte is also reactive but coarser grained. While also not using a VDOM its observers are merged with its Component system. It opts for splitting create/update paths as a means to optimize. In so lifecycle feels closer to something like Vue or React+MobX.