1 min readApr 18, 2020
I’m sorry, but this example is not good for what it is trying to demonstrate. The data tier is using a Class that doesn’t need to exist, tightly coupled to the DOM and events. While the DOM manipulation side is good, it would be better to abstract the following concepts into different modules (not necessarily classes)
Data (Model) access, View/Render and Action/Event handlers. This could be MVC, Redux or another state/view or component system.