Reactive UI’s with VanillaJS – Part 2: Class Based Components

In Part 1, I went over various functional-style techniques for cleanly rendering HTML given some JavaScript data. We broke our UI up into component functions, each of which returned a chunk of markup as a function of some data. We then composed these into views that could be reconstructed from new data by making a single function call.
This is the bonus round. In this post, the aim will be to get as close as possible to full-blown, class-based …

Reactive UI’s with VanillaJS – Part 2: Class Based Components is a post from CSS-Tricks

Link: https://css-tricks.com/reactive-uis-vanillajs-part-2-class-based-components/