The Web Component API is pretty strongly bound to classes. For example, registering a custom element ensures the argument is a class. There are some libraries which will help you compile to Web Components as a target. But there’s nothing like (for example) a React pure function component.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a more functional approach to writing the JavaScript as compared to the classes?
The Web Component API is pretty strongly bound to classes. For example, registering a custom element ensures the argument is a class. There are some libraries which will help you compile to Web Components as a target. But there’s nothing like (for example) a React pure function component.