Originally published on gitconnected.com
The world of frontend development once again evolved at a rapid pace over the past year, and this article recaps all the important events, news, and trends from 2019.
NPM Downloads for Popular Frontend Frameworks and Libraries in 2019
React once again claims the top library and is still growing, and jQuery is surprisingly holding at #2. Not far behind that Angular and Vue both have a strong user base of passionate developers. Svelte has received a lot of attention this past year, but it is still fighting to gain adoption.
After a rather quiet year, WebAssembly received some huge news early December — it is officially recommended as a language of the web by the W3C Consortium. The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web.
Since the announcement of WebAssembly in 2017, it has garnered heavy attention and rapid adoption. In previous years, we saw the 1.0 specification created and integration in all major browsers.
Another piece of news for WebAssembly in 2019 is the formation of the Bytecode Alliance which looks “to forge WebAssembly’s outside-the-browser future by collaborating on implementing standards and proposing new ones”.
We are still waiting for WebAssembly to truly take hold and gain mass adoption, and with each update, we get closer to that goal. There is no question that the W3C statement was a huge step to legitimize it for companies, and we need to continue to lower the barrier of entry for using WebAssembly to enable products to be more easily built with it.
In the StackOverflow Survey released early in 2019, TypeScript was tied for 2nd with Python as the most loved language, falling only behind Rust. It wouldn’t be surprising to see TypeScript climb even higher in the new survey released in early 2020.
TypeScript has consumed the web development world — both for the frontend and backend. Some developers tried to dismiss TS as a fad and thought it would go the way of Coffeescript, but TypeScript has proven to solve a core problem for JS developers and appears to only be growing in usage.
It’s worth noting just how popular TypeScript has become with it passing React in NPM downloads in 2019. It also has far more downloads than competitors such as Flow and Reason.
TypeScript and React solve entirely different problems, so this isn’t meant to be a direct comparison. It is only a demonstration of the popularity of TypeScript.
TypeScript v3.0 came out in late 2018 and through 2019 it has released up to version 3.7 which includes newer ECMAScript features such as optional chaining and nullish operators as well as improvements to the type checking functionality.
Vue and Angular have passionate users, with Vue even surpassed React in GitHub stars, but when it comes adoption for personal and professional projects, React continues to hold onto a strong lead.
In late 2018, the React team introduced hooks. In 2019, hooks consumed the React world with an overwhelming majority of developers adopting them as their preferred way to manage state and the component lifecycle. Throughout the year, countless articles were written about hooks, patterns began to solidify, and the most important React packages built custom hooks to expose their library’s functionality.
Hooks provide a way to manage a component’s state and lifecycle in functional components using a simple and concise syntax. In addition, React provides the ability to build custom hooks which allows us to create reusable code and shared logic without needing to create higher-order components or use render props.
After the huge addition of hooks in React v16.8, most of the changes afterward were relatively minor while releasing up to version 16.14 in 2019.
After the huge hooks release, the React team then shifted their focus to making the lives of developers better by providing more tools. In fact, developer experience was noted as the main theme of React Conf 2019. The keynote speaker of React Conf and manager of the React team, Tom Occhino, stated that developer experience is rooted it 3 things: low barrier to entry, high productivity, and ability to scale. Let’s take a look at what the React team released or plans to release to support this:
The belief is that a good developer experience will also lead to a good user experience, so this is a win for everyone. Watch the talk below by Yuzhi Zheng from React Conf 2019 about the upcoming React features or this link for all the talks.
Vue might not have the most adoption (yet), but it’s hard not to claim it has the most passionate users. Vue has been noted to bring in the best parts of React and Angular while also being more simple. Another huge selling point is that it’s more open and not controlled by a large company like React (Facebook) or Angular (Google).
The biggest news for Vue is its upcoming 3.0 release with alpha expected to land at the end of Q4. In 2019, Vue 2.x only received a few updates early in the year because most efforts are being put into the v3 release.
Just because there weren’t many releases this year, doesn’t mean there wasn’t a lot happening. When Evan You released the RFC for v3, a huge debate was sparked in the community over the changes as seen on Reddit and Hacker News.
The key issue that angered Vue developers is an overhaul of the framework’s API. However, after the backlash, it was noted that the API change will be entirely additive and backward compatible with Vue 2. Depending on how the release goes, many developers claim they may consider Svelte with these proposed changes, fearing Vue is trying to be too much like React. While there are still many in the community that are concerned, the noise seems to have quieted down while they wait for the release.
Aside from the debate, Vue 3 does have some other big changes coming:
The other notable Vue release this year is version 4 of the CLI which is mostly focused on updating the underlying tools.
Angular’s opinionated philosophy has helped it acquire a huge user base. Since Angular is a strongly opinionated framework, it requires devs to do things the Angular way, and it provides all the tooling necessary for its developers.
This removes many of the debates about which libraries and dependencies you should bring into the project, which is a potential issue you would find in teams building React apps. It also requires developers to write their applications in TypeScript. Since most of the choices are already determined, companies view it as a great option because it allows developers to focus on building products instead of spending their time thinking about packages.
In 2019, Angular released version 8, and it also released a new renderer/compilation pipeline known as Ivy. This biggest benefit of Ivy is smaller bundle sizes, but there are many great additional improvements it provides. Currently, Ivy is an opt-in feature until Angular 9. This article details the features released in version 8, but the notable updates are:
During December 2019, the Angular team has prepared the release of version 9 which looks like it will officially come out very late 2019 or early 2020. The biggest change in Angular 9 is that Ivy becomes the standard renderer.
Accessibility: “The practice of making your websites usable by as many people as possible. We traditionally think of this as being about people with disabilities, but the practice of making sites accessible also benefits other groups such as those using mobile devices, or those with slow network connections.” — MDN
Internationalization: “Design/develop your content, application, specification, and so on, in a way that ensures it will work well for, or can be easily adapted for, users from any culture, region, or language.” — W3C
While ES2019 has some great updates, the upcoming ES2020 looks to have some of the most anticipated features since possibly ES6/ES2015:
Flutter was released 2 years after React Native, but it has quickly been gaining ground. Flutter has nearly caught up to React Native in GitHub stars with 80.5k vs 83k and should pass it soon following the current trajectory.
Considering that Flutter doesn’t have the same developer community to leverage for growth like React Native did with React web developers, this is even more impressive. Flutter is making a case for itself to be the best cross-platform mobile framework.
Node released version 12 this year which is in long term support (LTS) until April 2023. Node 12 offers a host of new features, security updates, and performance improvements. Some notable updates include native support for import/export statements, private class fields, compatibility with V8 Engine version 7.4, support for TLS 1.3, and additional diagnostic tools.
Svelte found a way to inject itself into the conversation in the already-crowded world of frontend frameworks. However, as we saw at the beginning of the article, this didn’t translate to a huge amount of practical adoption yet. The best way to summarize Svelte is “simple but powerful”. The 3 points noted on the Svelte website are:
Svelte offers something new and exciting to the frontend landscape… by offering less. In 2020, it will be fun to watch how Svelte grows and develops, and hopefully we’ll get some examples of it being used at scale to see how it compares its bigger competitors in React, Vue, and Angular.
With the increased utilization of frameworks like Gatsby, the rapid growth of static website hosts like Netlify, and the countless number of headless CMS companies popping up, static sites prove they are going to be an integral part of the web.
Static sites combine the old web with the new tools, libraries, and updates to provide an unmatched experience. We are able to build our sites using modern libraries like React but then compile them into static HTML pages at build time. Since all the pages are now pre-built, there is no server time required to hydrate them with data on a request — the pages can be served immediately and take advantage of being cached in CDNs across the globe allowing the content to be as close as possible to your users.
Static sites are one of the ways to get incredibly fast products, but they aren’t suited for all apps — another excellent choice is PWAs (progressive web apps). PWAs allow you to cache resources in the browser to make pages respond immediately and also provide offline support. In addition, they allow for background workers to provide native functionality such as push notifications.
Some people have even made the claim that PWAs may even replace native mobile apps. Wherever things end up, there is no doubt that PWAs will be a big part of how companies build products for a long time.
Previously, if we wanted to build a SPA, we had to pull in our own dependencies with either Bower or NPM, figure out how to compile it using Browserify or Webpack, write an Express server from scratch, and maintain our apps through the onslaught of library updates.
We had a few years of pain, but now we’ve iterated our way to one of the most vibrant and developed package ecosystems. There are tools to help up us abstract away the painful parts of building applications — Create React App, the Vue CLI, the Angular CLI, Gatsby for static sites, Expo for React Native mobile apps, Next/Nuxt for SSR applications, generators to create our servers, Hasura to remove the need even write a server for GraphQL, automatically generated TypeScript types using GraphQL Code Generator, Webpack continuing to get more streamlined — there is a tool to handle the heavy lifting for almost any need we have.
Maybe now we have tooling fatigue?
GraphQL promises to solve many of the issues presented by traditional REST-based applications. Developers quickly fell in love with GraphQL, and tech companies are finally catching up in adopting it. GitHub wrote it’s newest API in GraphQL a few years ago, and many other organizations are making the change also.
A GraphQL app is data-driven instead of endpoint-driven, allowing the client to declare the exact data they need and receive a corresponding JSON response from the server. GraphQL APIs provide a schema to document all the data and their types, giving the developer full visibility into the API.
Since GraphQL APIs provide a fully typed schema, it also integrates well with applications using TypeScript. Using a tool like GraphQL Code Generator, it can read the queries in our client code and match them against the schema to provide TypeScript types that will flow through our entire application.
GraphQL downloads have more than doubled over the past year, and Apollo is starting to separate itself as the most utilized framework.
Developers are passionate about their IDEs/text editors and aren’t afraid to get into arguments about why their choice is the best. However, for the frontend, developers have almost unanimously chosen VS Code as their editor. VS Code is an open source editor that offers plugins to provide an incredible developer experience.
Here is the usage of text editors according to the State of JS Survey 2018 (this will be updated when the 2019 survey is released):
Improve build performance with persistent cachingImproving long-term caching with better algorithms and defaultsClean up internal patterns without creating any breaking changesJest moves from Flow to TypeScript
Internet Explorer and its newer incarnation Edge have been a joke to web developers, and even worse, a terrible pain to work with. The browser constantly lagged behind in web feature implementation and is notoriously difficult to write cross-browser compatible code for. In a huge win for devs, Microsoft has elected to use Google’s open source Chromium engine. In mid-2019 this change reached the beta stage.
Create your free account to unlock your custom reading experience.