Ten years of React, and new documentation site has framework opinions to share

Ten years of React, and new documentation site has framework opinions to share
Developers

The React team has released a new documentation site, including recommendations for using “a full stack React framework like Next.js or Remix.”

“React will soon be ten years old,” states the post by Facebook developer Dan Abramov and AWS developer education lead Rachel Nabors.

According to this history React was invented by Jordan Walke, then at Facebook, in 2012; but was introduced and open sourced at a US An conference on May 29-31 2013 – making May 2023 perhaps the ten year anniversary that Abramov and Nabors have in mind.

Today React has a dominant position in front-end web development. The State of JavaScript survey shows React usage climbing steadily since 2016, to over 80 percent today, whereas Angular has declined to just under 50 percent (some developers use both).

React usage has grown steadily over the last 6 years. Image from State of JavaScript survey 2022.

What is React though? The new site emphasises that React is a library that “lets you put components together” and not a complete framework like Angular. The documentation now recommends using a full-stack framework, mentioning Next.js and Remix. There is also a mention for React Native and Expo for building mobile applications, noting that with React Native “it’s not a web view – your React components render real Android and iOS views provided by the platform.”

There is more on the subject of frameworks in the guide on starting a new React project. While acknowledging that “you can definitely use React without a framework,” the docs also state that “It’s not hard to get an initial setup working, but there are a lot of subtleties involved in making an app that loads quickly even as it grows over time,” recommending use of frameworks which “solve problems like these by default.”

The docs distinguish between “production grade frameworks,” listing Next.js, Remix, Gatsby and (for React Native) Expo, and “bleeding-edge frameworks,”  covering Next.js App router and React Server Components.

A section on the React team’s “full-stack architecture vision” goes into more detail, explaining that the Next.js App Router integrates data fetching with Suspense, which displays a fallback user interface while content is loading. Currently, the docs state that “Suspense-enabled data fetching without the use of an opinionated framework is not yet supported,” again pointing React developers towards frameworks rather than using it as a library.

For some, including Matija Sosic CEO of Wasp, the new React docs have gone too far. “New React docs pretend SPAs don’t exist any more”, he complains, referring to Single Page Applications, once the most common use for React. “Both sides of the story should be presented, and the final call should be left to the developer,” he wrote.

There is another aspect to this though, which is the matter of whether modern React has become too complicated. “The complexity of the full-stack frameworks is getting untenable” said a developer on Hacker News, a contentious opinion but not without support. Perhaps insisting on full-stack frameworks is a sign of complexity that now needs to be managed, which is not such a good thing.