2 ms·
Probably not too relevant/helpful anymore, but the problem might be that React components don't return HTML: they're functions that return a collection of JS ob
by Vinnl 4y ago
Probably not too relevant/helpful anymore, but the problem might be that React components don't return HTML: they're functions that return a collection of JS objects that describe what the DOM ("HTML") should look like, and React compares that to what the DOM actually looks like and applies the relevant changes. These functions get called every time something changes. Having that mental model is vital for React "clicking".