3 ms·
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
by scottmf 9y ago
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.
- deleted 9y ago[deleted]
- dmitriid 9y ago...and property names are Javascript property names. Because, well, JSX is a very thin layer on top of Javascript