DEV Community

loading...

Discussion on: Svelte is the most beautiful web framework I've ever seen

Collapse
pulljosh profile image
Josh Pullen

React forces you to write <div className="asdf" /> as opposed to <div class="asdf" /> and <label htmlFor="asdf" /> instead of <label for="asdf" />. This is because class and for both have intrinsic meaning in Javascript, and when JSX was first created they were worried that reusing this naming could cause problems. (My understanding is that they now believe that class and for would have been fine in the first place...)

I'm pretty sure that bit in the Svelte docs is saying that those renamings aren't necessary in Svelte.