4 ms·
it's only what I already know, Javascript and HTML But it's not. "className", much?
by marcusarmstrong 11y ago
it's only what I already know, Javascript and HTML
But it's not. "className", much?
- Nogs 11y agohttp://www.w3schools.com/jsref/prop_html_classname.asp http://www.w3schools.com/jsref/prop_html_classname.asp
- marcusarmstrong 11y agoSure. But that's different than <div className="blah">.
- smhg 11y agoNot much. These are actually the Web API attribute names you should use when accessing these attributes from a non-HTML language (e.g. JavaScript). The React folks didn't make them up.
- smhg 11y agow3schools might have gotten a bit better lately, but please use MDN as a reference: https://developer.mozilla.org/en-US/docs/Web/API/Element/className https://developer.mozilla.org/en-US/docs/Web/API/Element/cla... They offer so much more context.
- deleted 11y ago[deleted]
- petrbela 11y agoOh boy, "className" and "labelFor". See, wasn't that hard to learn JSX if you already know HTML.
- marcusarmstrong 11y agoI'm not saying it's hard. But {?variable} isn't hard either.
- smhg 11y agoI think you meant htmlFor, no? But I completely agree with the sentiment that it is nice to stay as close to plain HTML and JS as possible.
- petrbela 11y agoYeah, thanks. I don't actually remember if I've ever used it :D