State of React 2024: TanStack Query jetzt beliebter als Next.js

According to a survey, React developers continue to struggle with the same APIs and hooks. TanStack Query receives positive reviews and overtakes Next.js.

listen Print view
JavaScript-Bibliothek React

(Image: erzeugt mit KI durch iX)

5 min. read
Contents

The results of the "State of React" survey from fall 2024 are now available. The Devographics collective, which is also behind the "State of JavaScript" survey, organized it for the second time and received responses from around 7900 React developers worldwide. Their most frequently used APIs and hooks, including the associated difficulties, show a similar picture to the survey from 2023, but the current version React 19 could have a positive impact on the developer experience. TanStack is currently working on a full-stack framework that could compete with Next.js.

Videos by heise

As in the previous year, forwardRef and memo are the biggest "pain points" among the most common React APIs – but this is likely to change with React 19. This version was released in December 2024 – after the survey was conducted – and should resolve the difficulties: forwardRef is no longer necessary in the new release and is now considered deprecated (obsolete). It therefore remains exciting to see what findings the next edition of the survey will bring.

State of React 2024: These common React APIs cause the greatest difficulties for developers

(Image: Devographics)

Among the new APIs, which were again surveyed separately, the React Server Components are once again in first place on the unpopularity scale with 20 percent, although this is four percent less than last year.

As in the previous year, useEffect is the most difficult hook in first place, which the study makers explain primarily by the fact that it is associated with the manual management of dependency arrays. These are in second place on the unpopularity scale, ahead of the useCallback and useMemo hooks.

When asked about the use of all React features, the study participants used useState, useEffect, <Fragment>, useRef and useContext – most frequently, with over 90 percent of them already using them and useState even 99 percent.

Respondents were also able to give a positive, neutral or negative rating for each of the features used and optionally add a comment. At 56 percent, <Fragment> received the most positive feedback, followed by useState with 50 percent and createContext with 49 percent. Three percent of people who had heard of createContext but had not yet used it also expressed a positive opinion of it.

However, the React developers are far from unanimous. One developer comments on <Fragment>, for example, that it is easy to use but shouldn't be necessary ("It's easy to use, but it shouldn't be necessary"), while another person has always found it to be superfluous syntax ("This has always felt like unneeded syntax, I've always wondered if it can go away"). Others, on the other hand, are enthusiastic about it – and the positive comments include a simple "Love this!".

Among the React libraries and frameworks, the open-source state management tools TanStack Query and Zustand have moved up the popularity rankings: they have pushed Vercel's React framework Next.js from first to third place, while TanStack Query has emerged as the winner. The latter is causing a veritable storm of enthusiasm among the developers surveyed, who emphasize it several times in the comments as "the best" – or once even as "my beloved" –. State also received rave reviews, but only took second place if the 13 percent of interested people who have not yet used it are included.

For this question, the survey team included some items such as useState and fetch as reference points, although these are not libraries, as the graphic shows:

State of React 2024: TanStack Query and State have overtaken Next.js in terms of positive ratings.

(Image: Devographics)

According to the survey, the most used framework is Create React App, but with 33.1 percent negative ratings, only Redux is even more unpopular with 34.1 percent. Last year, however, the survey makers already pointed out that Create React App is officially considered obsolete.

In addition to the core features of React, for which React 19 has some improvements in store and whose effects should become apparent in the next study, Devographics also takes a look at TanStack in the introduction to the study. Building on the success of TanStack Query, the development team is currently working on TanStack Start, a potential Next.js challenger. The full-stack framework TanStack Start, which is based on the TanStack Router, is currently in the beta phase.

All the results of the current"State of React" survey can be found on the website. There, interested parties can filter by frequency of use or positive or negative ratings, for example. The comments can be viewed by clicking on the speech bubble at the end of the respective line.

JavaScript conference by Heise: enterJS 2025
Enterprise JavaScript Conference enterJS 2025, May 7 and 8 in Mannheim, Germany

(Image: WD Ashari/Shutterstock.com)

enterJS 2025 will take place on May 7 and 8 in Mannheim. The conference offers a comprehensive look at the JavaScript-supported enterprise world. The focus is not only on the programming languages JavaScript and TypeScript themselves, but also on frameworks and tools, accessibility, practical reports, UI/UX and security.

React highlights from the program:

Tickets are available at an early bird price in the online store.

(mai)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.