I wonder what is the motivation for this pattern to directly update the DOM instead of the…
Dmitri Zaitsev

I treat views as semi-immutable: constructor instructs the creation and update function handles the update so, that I can always update with fresh data.

Another benefit is, that browser is actually really fast to compare attributes/properties/styles/classes, so I actually save memory and render time. Plus bundle size stays small.

Sometimes I use models, getters, setters etc as well – depends on the use case.

Like what you read? Give Juha Lindstedt a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.