Learn JavaScript, not frameworks

A reasonable way to keep up with changes in the JavaScript universe.

Posted by Krzysztof Zbiciński on 2017-11-01.

Which framework should I begin with?

almost everyone

This is definately one of the most common questions asked by people who are learning JavaScript. The answer to it is surprisingly simple and it’s not React, nor Angular or Vue.

The real answer is: It doesn’t matter.

Sidenote: React is actually not a framework, but I’ll exchange terms ‘library’ and ‘framework’ in this blog post for clarity.

Recent history recap

When I began with professional web development in 2012, the most commonly used library was jQuery. Attaching events to DOM elements, changing page contents dynamically, AJAX requests - achieving all those was made relatively simple. The library provided an additional level of abstraction over the native methods and unified browser-specific differences in behaviour.

Then there were early MV* libraries such as Backbone or Knockout. Using them required shifting the way one thinks about the code structure, however they enabled writing even more complex applications which were still maintainable.

Eventually we witnessed the rise of Angular which required even greater change in one’s mindset. In that moment, only 2-3 years after it’s prime time, jQuery was considered archaic. After a year or two of Angular’s hegemony, there was new cool kid on the block - React.

If you would like to keep up with changes you’d have to constantly learn new frameworks from the scratch. It’s doable if you don’t care spending most of your free time staring at the computer screen and sacrificing other aspect of your life. Especially nowadays, when new, shiny JavaScript frameworks appear so often.

It’s not funny, rather painfully true.

The reasonable approach

What I suggest instead is choosing whatever library you like most (because of syntax, community support or tossing a coin) and sticking to it. In the meantime learn general ideas, architectural patterns and JavaScript fundamentals. Concepts of e.g. DOM manipulation, inheritance, routing, a component or a controller are universal and commonly used in all of the modern libraries. Having those basics, you’ll be able to pick any new tool in the future and become considerably good at it within just a week or two.

Photo by Jessica Ruscello on Unsplash.