2 ms·
> 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 h
by Vinnl 8y ago
> 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.
- olavgg 8y agoThere is a design pattern for that called Observer pattern.