Skip to content

re: Svelte is the most beautiful web framework I've ever seen VIEW POST

re: From Svelte docs: "You can use reserved words as prop names." Can you provide an example of when you would want to use a reserved word as a prop n...

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.

code of conduct - report abuse