All Things Web

JavaScript and TypeScript Trends 2024: Insights From the Developer Ecosystem Survey

Read this post in other languages:

For the last seven years, we at JetBrains have been running our Developer Ecosystem Survey in an effort to map out the changing developer landscape and the major technologies used. The results, both the raw data and analyzed reports, are shared with the community so we can all understand what’s happening in our ecosystem. Today, we’ll look at the results of this year’s survey, focusing on JavaScript and TypeScript.

An overview of the survey

Our 2023 Developer Ecosystem Survey brought together insights from 26,348 developers from all over the world. You can check out the survey results yourself for information covering a wide range of topics, from programming languages, tools, and technologies to useful demographics and fun facts. We’ll also take a look at the unique lifestyles of developers, shedding light on their passions and interests. To try to make the survey as fair and representative as possible, the methodology includes several stages that are designed to clean the data and eliminate any biases. You can read about the exact methodology we used here.

JavaScript insights

JavaScript usage trends

Once again, the survey reports JavaScript as the most-used programming language in 2023, taking its winning streak as the top language used up to seven years in a row. This is likely because JavaScript is a low-barrier language that powers a lot of front-end web development. Interestingly, its share has dipped slightly in each of the last three years, which might be an omen of future change since this decline has coincided with a rise in TypeScript adoption.

What do JavaScript users typically develop?

A massive 80% of JavaScript developers work primarily on websites. The second most common software products developed with JavaScript are utilities (small apps for small tasks). Only a small number use JavaScript to develop other types of software. Breaking the data down into the two main development branches, 86% of JavaScript developers work on frontend projects, with 34% also involved in the backend.

JavaScript and TypeScript code editors and IDEs

The results of the survey show a large percentage of respondents (51%) are using Visual Studio Code for their JavaScript and TypeScript development. The second most popular tool is WebStorm (21%), followed closely behind by “another IntelliJ-based IDE” (16%), otherwise known as JetBrains IDEs, which include PyCharm, IntelliJ IDEA, GoLand, and PhpStorm.

If you’re wondering if you should use a code editor or an IDE, the answer is simple – you can use both and switch between them depending on the task you’re working on. Code editors can be a better choice for quick edits or smaller projects, whereas IDEs tend to be more reliable when working with large projects or complex tasks.

JavaScript framework preferences

JavaScript frameworks and libraries are prevalent within the JavaScript developer community, with only 8% of JavaScript developers saying they don’t use them. Frameworks and libraries provide developers with tools and structures that simplify building complex and interactive web applications. Of these frameworks, the clear favorite is React, with 57% of JavaScript developers using it. According to the survey, the second most used is Vue (32%), with third place going to Next.js (27%). Angular and Express (20%) are tied for fourth place.

Typically, the three most popular frameworks for frontend development you’d expect are React, Angular, and Vue. The choice of framework largely depends on the project’s specific requirements and the team’s preferences.

Reasons why React might be the most used framework

  • React was first released on May 29, 2013. Though it wasn’t the first framework on the market, it did benefit from being the first of the big frameworks with a generally solid track record of performance. This, in turn, led to early mass adoption. Developers who learned it early were able to keep using it, as it has kept evolving to meet their needs.
  • React, like other UI frameworks, follows a component-based architecture, where UIs are built as a tree of reusable components. This modular approach makes it easier to manage and maintain code, as well as promote code reusability across different parts of an application.
  • React uses JSX, which is a syntax extension for JavaScript. JSX allows developers to write HTML-like code within JavaScript, providing a pleasant developer experience on account of most users’ familiarity with the relevant concepts.
  • React is flexible and can be used in various project types, ranging from small single-page applications to large, complex web applications. Its flexibility makes it a good choice for various development scenarios.

Module bundlers

Module bundlers are valuable tools for JavaScript developers. Beyond allowing you to bundle your files and assets in a way that ensures they are aware of each other, they also enable you to map the dependencies. Much like resolvers, module bundlers typically work by checking that the files necessary for all dependencies to work are available on initialization. They then process each file within a module and construct a dependency graph for them.

Once that’s done, the module bundler then consolidates these modules into a singular file, which is specified in the ‘output’ configuration parameter, and maintains a registry of all modules so you can correctly call/execute them as and when required.

The top module bundler of 2023 is webpack, with a massive 57% of JavaScript developers using it. Webpack has been around for 10 years and has continued to evolve to meet the changing needs of developers. That said, we’re starting to see wider adoption of alternatives such as Vite (38%) and esbuild (11%) as people search for better performance from a more minimal setup.

Unit testing

Unit testing, to the dismay of WebStorm Developer Advocate Jan Niklas Wortmann, is not exactly common practice among JavaScript developers, with 32% of the respondents not writing unit tests. Of the respondents that do, Jest is the unit testing framework of choice, with a 40% majority. Cypress is the second most used with 15%, with Mocha, Vitest, and Playwright all hovering around the 10% mark. Jest is mostly hassle-free, with no configuration needed to get it up and running. This might be a huge part of why unit testing is not adopted – it feels inaccessible and has a high barrier to entry.

Challenges faced by JavaScript developers

JavaScript continues to have its challenges, but the community continues to work on them. For instance, the asynchronous model has been improved with the introduction of async/await. Library and framework fatigue has slowed down, with the main libraries and frameworks now maturing and taking inspiration from each other. Love it or hate it, it lacks strong typing – a problem that is still yet to be solved – but with the advent of TypeScript, there is an easily implementable alternative that people can use.

TypeScript insights

TypeScript adoption and growth

JavaScript is a dynamically typed language that people have leveraged heavily and effectively, but this means it is widely accepted that errors are only discovered at runtime. There’s a shift towards the more type-safe TypeScript that can improve the overall developer experience, and the confidence developers have in their code. This can be seen in TypeScript’s increasing adoption over the years but also in the crossover with JavaScript when it comes to what developers use it for.

Why might people switch from JavaScript to TypeScript?

TypeScript is a superset of JavaScript with static typing, designed to play well with JavaScript projects, and can help teams gradually migrate existing projects. TypeScript also follows ECMAScript standards and typically supports the latest JavaScript features. This means developers can use features from future JavaScript specifications even before they are widely supported in browsers. The current stable release of TypeScript is 5.3.2, with TypeScript 5.4 expected in March 2024.

Conclusion

The JavaScript and TypeScript ecosystem continues to evolve. It’s now nothing like it was back in 2016 – the technologies, frameworks, languages, and libraries are now beginning to mature, with commonalities and trends emerging in developer preferences. Tools like WebStorm will continue to grow and improve to help developers get the best out of their code and work effectively with JavaScript and TypeScript. We hope that new, innovative technologies continue to be developed to help us solve the issues and limitations of this ecosystem. With this goal in mind, we’ll continue to update our products in line with the ecosystem and needs of developers like ourselves.

image description