DEV Community


Discussion on: Web Component Solutions: A Comparison

thawkin3 profile image
Tyler Hawkins Author

For sure, the example here is using ES5 syntax, so no default parameter arguments or arrow functions like you have. I also saw you chose not to use the constructor, which is a fine choice too. The example I included was just taken directly from the example that was included in the blog post I've referenced throughout.

I wouldn't call that "bloat" though. If we're just talking about number of lines, having the CSS and HTML scrunched together on one line like you have it isn't very readable, so I wouldn't exactly chalk that up as an improvement.