There’s so much hype these days around front-end frameworks (React, Angular, Vue) that I thought I would stop and think about what the problem is that these frameworks are solving and what they are useful for.

As an experiment, I’m going to create a simple component-based feature using nothing but jQuery (a small library of helper functions for working with the DOM) essentially Vanilla JS.

Image for post

Back to the basics. Only HTML, CSS, and JS

The feature is going to be a collapsible list of items. It must take a parameter that specifies the number of items to show on initial load. When you click ‘show more’ it will reveal all the items in the list, when you click ‘show less’ it will hide all except the previously selected ## of items. It must be extensible enough to add multiple collapsible lists on the same page.

Image for post

The end product (

After we build the feature we will step back and examine the experience to understand what advantages front end frameworks provide, and those that they don’t provide.

#software-development #front-end-development #javascript #js #web-development

Writing a Front End Component With Vanilla JS
2.90 GEEK