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.
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
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 becauseclass
andfor
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 thatclass
andfor
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.