DEV Community

Discussion on: Why I moved from React to Svelte and others will follow

Collapse
 
mikenikles profile image
Mike

Hi Avon,

Thanks for your feedback.

The on:submit|preventDefault syntax is optional. We could use the regular event.preventDefault(); call in the handleSubmit() function to keep the HTML cleaner.

In case of the htmlFor, thanks for pointing that out. I copied the initial source code from the React website to make sure I don't miss any feature in the Svelte version. I've updated the blog post and the interactive demo to use for.

Collapse
 
blowpurp profile image
Avon Barksdale

Good to know; appreciate you clarifying!