Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on HTML Attributes vs. DOM Properties.
TL;DR: they’re not the same thing. Only sometimes they match (e.g. `id`) but often they don’t.
Something fun: JSX does not use attributes, even if they look like it. That’s why they have unusual naming/formatting (`htmlFor` and `className`)
There are no comments on this comment yet.
TL;DR: they’re not the same thing. Only sometimes they match (e.g. `id`) but often they don’t.
Something fun: JSX does not use attributes, even if they look like it. That’s why they have unusual naming/formatting (`htmlFor` and `className`)