5 React trends to get ahead of in 2024
Tags: react, reactjsdevelopment, javascript
Published: 2024-01-15 12:19:13

As we kick off 2024, it’s time to look ahead. And while yes, it brings the Paris Olympics, the release of highly anticipated VR devices, and a potential new Nintendo console – that’s not all. It also marks React’s second decade and another year of innovation for the popular framework!

But what does 2024 hold for React? And what are developers excited about?

We spoke to our network and scoured communities to find out – here’s what they said.

## 1. The evolution of React Server Components (RSCs)

React Server Components (RSCs) [aren’t a new concept](https://legacy.reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html), but in 2023 they became a controversial discussion point.

Why? Largely because RSCs mark a fundamental shift in the way fullstack React applications are built.

A server component is a React component that runs exclusively on the server and returns some HTML, which is then sent to the client. This allows you to do things like run a database query within the component.

Where before components only ran on the client and we would call an intermediary API, with RSCs, components run on the service by default, where they can access the database directly.

Unsurprisingly, a significant change like this has caused some strong opinions within the React community - including [this post from Mayank](https://www.mayank.co/blog/react-server-components), covering the (almost) good, the bad, the ugly (and uglier) of RSCs for React Development.

Towards the end of 2023, Next 13.4 and their “App Router” provided a path and the tools necessary to start using RSCs in production. The implementation and support of RSCs by Next and Vercel makes them an important part of web development for those using these technologies. [Andrew Voirol](https://twitter.com/AndrewVoirol) noted this in response to our [poll on X (formerly Twitter)](https://twitter.com/ablyrealtime/status/1737127086098182291) that asked whether RSCs were exciting and why:

![Andrew Voirol React Twitter Post](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5es0p6kkqccng8ljd84h.png)

At time of writing, Next.js is the only framework with RSCs ready for production. What will be interesting in 2024 is whether or not other popular frameworks commit to adding RSCs or if they become easier to use without one. And we’re already seeing developments on this. [React Engineering Manager Eli White](https://thenewstack.io/javascript-in-2023-signals-reacts-rsc-and-full-stack-js/) told the News Stack that they expect to see more frameworks adopt Server Components in 2024, with [Remix](https://twitter.com/ryanflorence/status/1729274387671760936) and [Redwood](https://tom.preston-werner.com/2023/05/30/redwoods-next-epoch-all-in-on-rsc) the latest to add RSCs to their roadmap.

## 2. React metaframeworks

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqygt2klxze3kd4k6rjs.png)

Next.js is a hugely popular fullstack framework that has been used to build [websites from top companies including Notion, Netflix Jobs, and HBO Max.](https://nextjs.org/showcase)

It moved from the eleventh to sixth most popular web technology in [StackOverflow’s 2023 Developer Survey](https://survey.stackoverflow.co/2023/#most-popular-technologies-webframe). Interestingly though, the data suggests that it’s more popular among those learning to code, than it is amongst professional developers.

So, what frameworks are developers adding to their toolkit in 2024? When we asked, [Remix](https://remix.run/) and [Astro](https://astro.build/) came out on top.

Known as metaframeworks, Remix, Astro, and others are built on top of React and allow for additional features, functionality, and efficiencies compared with using React directly.

Let’s take a look at why they’re gaining traction.

### Remix

[Remix](https://remix.run/) describes itself as a fullstack web framework that lets developers focus on the user interface and work back through web standards to deliver a fast, slick, and resilient user experience. Despite being a newer framework, going open-source in 2021, it was [acquired by Shopify in 2022](https://shopify.engineering/remix-joins-shopify), and is used for its [business website](https://www.shopify.com/).

Best used for sites and applications with dynamic contents, Remix is growing in popularity for a number of reasons:

- Shopify backing: Remix still operates independently of Shopify, yet benefits from investment meaning the team can continue to build out its feature set.

- Flexibility: It can be used for creating a wide range of applications in a way that lets developers control their own stack.

> “I like Remix because it provides a sense of freedom… almost too much freedom. There’s so much about Remix that can be changed to suit my needs that I feel selfish.” Paul Scanlon, Developer Advocate - [I’m in an Open Relationship with Remix](https://thenewstack.io/im-in-an-open-relationship-with-remix/)

Though Remix immediately impressed some, others have taken a little persuading. [Theo - T3.gg](https://www.youtube.com/@t3dotgg) was originally skeptical but [recently spoke about their excitement for its future](https://www.youtube.com/watch?v=ECr_5J_TlAs). The main reasons being its minimalist approach and focus on performance and web standards – along with its recent improvements, including the [Remix Vite plugin](https://remix.run/blog/remix-heart-vite), and the [promise of RSCs](https://twitter.com/ryanflorence/status/1729274387671760936).

### Astro

[Astro](https://astro.build/) describes itself as the web framework for building content-driven websites. It’s best used for websites that require high performing, static pages, including blogs, marketing, agencies, and portfolios.

It might not be as suited to websites that require huge scale or greater levels of interactivity, such as large scale eCommerce sites, or websites like Facebook that run like apps.

We looked at X (Twitter) threads, Subreddits, and community posts to see why developers choose Astro. Some of the common themes we identified were:

- Accessibility: [Astro’s goal is to be accessible to all web developers](https://docs.astro.build/en/concepts/why-astro/#:~:text=Astro's%20goal%20is%20to%20be%20accessible%20to%20every%20web%20developer.&text=The%20.astro%20UI%20language%20is,you%20can%20write%20Astro%20components!). As such, it’s known for its ease of use and has less of a learning curve than other more complex frameworks.

- Developer experience: Several comments and discussions highlighted Astro out for its superior developer experience. This includes features and tools that meet developer needs such as its markdown integration.

- Framework agnostic: Astro can be used alongside other frameworks including React, Vue, and Svelte.

In the video below, Jason Lengrstrof explains why he’ll reach for Astro in 2024, which largely comes down to it’s flexibility, in that you can:

- Use it for wholly static sites.
- Enable “Hybrid mode” for dynamic elements like a newsletter signup.
- Enable “Server mode” to server-side render your whole site for a fully dynamic experience.

{% embed https://youtu.be/kssIEqSJeMI %}

_“Next is just in case, it’s power that you probably don’t need. Whereas Astro is just in time. You don’t use any of the stuff until you need it. At which point, flip a switch and we’ll turn it on for you,” [Jason Lengrstrof](https://www.youtube.com/watch?v=kssIEqSJeMI)._

The growth of these metaframeworks shows that in 2024 there is more choice and more flexibility in how you choose to build websites and applications. For React developers in particular, this opens up new opportunities to take existing React skills, and carry them into full-featured web development frameworks that better align with their opinions and requirements - whether that be Next, Remix, Astro, or something else.

## 3. State management

React state management isn’t a new topic, yet – as newer solutions (e.g. Signals, Zustand, and Recoil) approach things differently to existing solutions (Redux and React Hooks) - state management tools continue to be a point of debate amongst React developers.

Let’s start with a quick look at the two major players.

First up, [Redux](https://redux.js.org/) is a state container for JS apps, with React-Redux providing official React bindings.  

Depending on where you look, Redux is either still [one of the strongest state management tools](https://press.farm/react-trends-and-future-developments-in-2024/) or something that, despite working, [might not always be needed](https://medium.com/@kavandev1/should-you-still-go-with-redux-in-2024-exploring-alternatives-and-comparisons-1d39af077144). Once almost a prerequisite for React development, there seems to be a growing consensus that Redux is actually best saved for large, complex applications.

As for React Hooks, useState and ReactContext are common solutions for sharing state across an application. The issue is that within Hooks, there are [rules](https://react.dev/warnings/invalid-hook-call-warning) to be learnt about how and when they can be used within components. This can make them difficult to get to grips with and even harder to perfect.

Because of their complexity, there is also an argument that both Redux and React Hooks can result in bloated code and unnecessary rendering across an application. As a result, there are an increasing number of alternatives that offer a more minimalist approach.

Zustand, for example, stands out as it approaches the solution in a similar way to Redux, only more simply - requiring less code. It also took the top spot for state management libraries in this year’s [JavaScript Rising Stars Report](https://risingstars.js.org/2023/en?ck_subscriber_id=2269814472#section-statemanagement). (More on the differences between Zustand and Redux, [here](https://medium.com/@breakingbadjs/zustand-vs-redux-a-comprehensive-comparison-in-state-management-687a86156b14)).

In addition to Zustand, there are other libraries gaining popularity, including: Recoil, MobX, and Jotai.

![metaframework-download-trends](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6sq53u5gq1q0jr3vzwpz.png)

(Drop offs due the holiday season)

In addition to these libraries, Signals is another state management pattern that, despite having been around for some years, still divides the React community. Now available with React through the [Preact library](https://preactjs.com/guide/v10/signals/), Signals aims to solve some of the issues with Hooks, and more complex state management libraries like Redux. It does this by making it easier to store values and update them across applications, yet only rendering the components that change.

Those who like it, love it. Check out [this video](https://www.youtube.com/watch?v=SO8lBVWF2Y8) by Web Dev Simplified on YouTube for a demo showing exactly how Signals works in action (and why, in their opinion, it’s a preferable solution compared to Hooks).

[Whereas those not sure](https://www.reddit.com/r/reactjs/comments/14tzwdw/why_are_signals_still_not_so_popular/), might remember a not-so developer friendly experience when they were first introduced in the Knockout JavaScript library, or have found an alternative solution or favored library that works better for them.

We’re sure this will continue to be a much discussed topic this year, which can be a bit overwhelming. To help, here’s an article with a bit more detail on [state management approaches and solutions in 2024.](https://dev.to/nguyenhongphat0/react-state-management-in-2024-5e7l)

## 4. AI for software development

AI continued to be a [disruptor for many industries in 2023](https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai-in-2023-generative-ais-breakout-year) and it shows no sign of slowing down. AI chatbots are transforming customer service and support, AI content generation tools are becoming embedded in marketing workflows, and teams across organizations are harnessing the power of AI to help them analyze data and improve forecasting.

In addition, [Startups UK](https://startups.co.uk/news/average-funding-for-ai-startups-increased-by-66-startups-100-index-data-reveals/) found that average funding for AI startups has increased by 66% between 2021 and 2023 - the second highest, behind the tech sector.

Clearly this means a lot more developers will be building AI-led products - but what does it mean for how new products are built?

AI tools for software development is an industry within itself - with new tools for writing code, maintaining code integrity, productivity, and reporting emerging all the time.  

We asked over 40 software developers how they feel about using these tools on their projects, and the results were pretty positive!


![Survey results for using AI in software development](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18bka8wyu4urdz54fu12.png)

While our sample was admittedly small, the sentiment is backed by a [Github study](https://github.blog/2023-06-13-survey-reveals-ais-impact-on-the-developer-experience/) of 500 U.S-based developers at enterprise companies.

Key findings of that study included:

- 92% of U.S based developers are already using AI tools both in and outside of work.
- Over 80% expect that AI tools will make their team more collaborative.
- 70% said that AI coding tools will offer them an advantage at work (citing better code quality, completion time, and incident response as key benefits).

Going back to our survey, we also asked respondents which tools were the most popular.

The top two?

- Github Copilot: An AI coding assistant, able to autocomplete code, help find bugs, and suggest improvements.
- Figma / Visual Studio: A tool allowing developers to collaborate with designers, without leaving their development environment.

For React developers specifically, there are [Figma AI plugins](https://www.figma.com/community/tag/figma%20to%20react/plugins) that convert mockups into working React components.

Vercel’s generative AI tool, [v0](https://vercel.com/blog/announcing-v0-generative-ui) creates working React code from user prompts, like the description of an interface. Launched in October 2023, 100,000 users registered for the waitlist in just three weeks.

## 5. Learnings and innovation for building collaborative experiences

There is undoubtedly a [growing trend towards realtime collaborative apps and features](https://hubs.la/Q02gpwb30) - championed by the likes of Miro and Figma. This has driven both the need to build products that are collaborative at the core like the examples mentioned and for existing single user products to add collaborative features - and React is critical to achieving the UI side for both solutions.

This growing trend led to lots of innovation in the space in 2023, with more to come this year - giving React developers more options and a chance to build collaborative experiences in a way that’s right for their application and users. A couple of evolving areas are conflict resolution, and new solutions that lower the barrier to entry for adding collaborative features in the first place.

First up, conflict resolution. That is, making sure multiple users can work from and update the same space in realtime, without conflicts hindering the user experience. For example, what happens if two users try to edit the same spreadsheet field at the same time?

Two common ways to solve this are Operational Transformation (OT) and Conflict-free Replicated Data Types (CRDTs).

OT works by sending document operations to a central server. For example “insert ‘world’ at offset 6” where the offset value is the character offset where the insertion should occur. It was originally developed in the late 1980s for text editing, and is used by potentially the most well known text editor, Google Docs.

CRDTs, on the other hand, allow for shared data types that can be edited at the same time without needing to route updates through a central server.

OT’s tried and tested approach and use by giants like Google makes it a go-to choice for many - despite some edge cases and its central server requirement. However, over the last few years CRDTs have undergone [some improvements](https://www.youtube.com/watch?v=Mr0a5KyD6BU) and stand as a viable and popular alternative that form the basis of frameworks including YJS and Automerge.

What’s important now is for developers to really understand both options in order to make the right choice for their app and users.

To keep things interesting, there’s also a third option in addition to OT and CRDTs. That is, to not use either but to rather use things like component locking to avoid conflict from happening in the first place.  

In relation to CRDTs, this is an option that [certainly gets people talking](https://news.ycombinator.com/item?id=38289327) - as our Senior Engineer Zak Knill found out when [he wrote an article on it](https://hubs.la/Q02gpwl50).

In the article, he explains the downsides to CRDTs and why they might not be essential for conflict resolution in collaborative experiences outside of text editing and working offline. Explaining instead that instead you need:

1. Contextual information: The ability to show where a collaborator is in the collaborative environment; who is engaging with the page, which element they’ve selected, and where their cursor is.

2. Locking for safety: The ability to lock the smallest possible individual components or elements of the page to stop conflicting updates from happening.

3. Small-scale updates: The ability to update only the information that has changed, and no more.

4. Realtime fan-out of updates: The ability to share the update a user has made, in realtime, with all the other collaborators in that environment.

In addition to these solutions and frameworks like YJS, there is a [growing number of providers building products to enable developers to build collaborative experiences](https://hubs.la/Q02gpwsB0) more easily in 2024.

We’re one of them, so forgive us a short plug. Our in-app collaboration SDK, [Spaces](https://hubs.la/Q02gpwZM0), comes with an intuitive set of APIs that allow you to build realtime [collaborative features](https://hubs.la/Q02gpxpJ0) such as avatar stacks, live cursors, member location and component locking. [It works seamlessly with React Hooks](https://hubs.la/Q02gpyBQ0), making it easy to set up a collaborative environment in any part of a React application. Have a closer look [here](https://hubs.la/Q02gpz9D0), or try out our [examples](https://hubs.la/Q02gpzfv0).

As the [industry is continuing to grow](https://www.statista.com/outlook/tmo/software/productivity-software/collaboration-software/worldwide#revenue), its clear collaborative features are becoming something users expect. However you choose to implement them, we’re excited about the levels of innovation in this space!

## Looking ahead

Whichever way you look at it, 2024 is going to be a big year for React. From the evolution and adoption of React Server Components, to the lively ongoing debate about state management, there’s plenty for React Developers to get excited (or frustrated) about.

As AI continues to change the way we work and new technologies allow you to build in a way that works for your app and your users, we’ll be keeping a close eye on things to see how they develop over the next twelve months.

In the meantime, we’d love to hear thoughts on what’s happening in the React space, as well as learning about what you’re working on experimenting with in 2024 - tweet us [@ablyrealtime](https://twitter.com/ablyrealtime?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor) or join the conversation on [Reddit](https://www.reddit.com/user/AblyRealtime/).