When to use ES6 Class?

Hi.

The question arose, in some cases, the use ES6 Classes more appropriate?

Take 2 cases:

1) a Typical web site with Ajax transitions. Simple widgets: popup, sliders, filters, lightboxes, galleries, search, and the like. Don't use any frameworks and design patterns interfaces.

2) Web application on figuratively speaking angular/react/vue/someAnotherHype.js etc. The interface is divided into components.
2.1) PS is Normal to have components in the form of classes?

I would like to understand the use of ES6 classes when creating web sites, because can not find the implementation classes when creating interfaces, given the fact that most of the components are different from each other in terms of functionality and have little in common.

I understand that if I do not see where to use them, so I don't need it. But I want to learn to improve your thinking principle when creating web sites and web interfaces.

Thank you.
June 14th 19 at 19:19
1 answer
June 14th 19 at 19:21
Is it normal to have components in the form of classes?

"Normality" is a term from psychiatry, meaning the fact that someone else is doing what we at this point of time and in a given society think is acceptable. There were times when people said "we should split the markup, styles and scripts, and in any case should not mix them". It was considered normal. Even treated good practices. And then there react. And the same people began to say "Yes, let's all in one file to clubbing, it's cool, and vebacom can the whole project with all the resources in one bundle compress". And now it's the norm. As you can see, normal little has changed.

can't find the implementation classes when creating interfaces

View on my leisure bike. It is far from perfect and is rather a ground for experiments, but there is just well see what happens in the code when using classes of components.

Find more questions by tags FrontendJavaScriptWeb Development