Thanks for this - however I'd suggest a few small improvements:
Don't create an object called STATE, it's unneccessary. Store each variable as a simple top-level variable in your component, and then make your validation attributes (valid, etc) reactive (using $:). That way you don't need to call validateForm() or do any of the manual legwork.
You don't need to use redux with Svele. It's totally unneccessary. Svelte has stores, which is a simple, powerful cross-component state model. However for local component state - just use variables, as mentioned above.
One of the most important differences between Svelte and Vue/React is that it is compiled. It's probably worth mentioning this in your intro :)
Thanks for the detailed feedback Anthony. I would agree that using separate variables and adding reactive calculation could be a nice demonstration of this feature in Svelte.
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.
Thanks for this - however I'd suggest a few small improvements:
Don't create an object called
STATE
, it's unneccessary. Store each variable as a simple top-level variable in your component, and then make your validation attributes (valid, etc) reactive (using $:). That way you don't need to call validateForm() or do any of the manual legwork.You don't need to use redux with Svele. It's totally unneccessary. Svelte has stores, which is a simple, powerful cross-component state model. However for local component state - just use variables, as mentioned above.
One of the most important differences between Svelte and Vue/React is that it is compiled. It's probably worth mentioning this in your intro :)
Thanks for the detailed feedback Anthony. I would agree that using separate variables and adding reactive calculation could be a nice demonstration of this feature in Svelte.