Hacker News new | ask | show | jobs
by vagrantJin 1260 days ago
> delegate state changes to escape hatches

Ay.

Can you please explain what this means in simple, 5th grader English?

1 comments

React says what things should be, given a limited state. (These elements read X, and update when X changes.)

Vanilla JS says how to do things (find these HTML elements and update them by doing X).

It is much simpler to track and mutate a state object, than it is to find all the nodes you need to update and update appropriately.