Re:Vue.js vs. React
by innocenat on Saturday August 19, 2017 @12:15PM
(#15054149)
When you make it so that (which is how everyone is writing Vue anyway)
It gets really, really clear that anything not in {{ }}, or attribute not prefixed by @ or : is HTML.
[ Parent
| on HN ]
What's the difference between :disabled and the regular HTML disabled? Same for ID, etc. How do strings differ from variable names?
The only way I see that as being more "intuitive" is if you're familiar with other templating languages.
JSX is far clearer:
<button disabled={isButtonDisabled}>Button</button>
<form onSubmit={handleSubmit}></form>
<a onClick={doSomething}></a>
All you really need to know is everything between braces is plain JavaScript, and property names are camelCased.