Skip to content

Comment on I love React Hooksparent

Comments

Believe it or not, but managing state is dead simple with just vanilla javascript.

Keeping state and the view in sync, however, is not. For example, if you have a list of TODO's that the user can edit in the browser, and that you want to be able to send to the back-end, every time the user adds a TODO, you'll have to remember to update both the model and the DOM. Likewise after an edit or deletion.

These tools really do solve a problem.

There is a design pattern for that called Observer pattern.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.