1 React is evolving


React is a JavaScript library for building beautiful user interfaces. The React team wants the developer experience to be as great as possible so that developers are inspired and enabled to create delightful, productive user experiences. React Hooks in Action with Suspense and Concurrent Mode is your guide to some of the latest additions to the library, additions that can simplify your code, improve code reuse, and help make your applications slicker and more responsive, leading to happier developers and happier users.

This chapter gives a brief overview of React and its new features to whet your appetite for the details that follow later in the book.

1.1 What is React?

Say you are creating a user interface (UI) for the web, the desktop, for a smartphone, or even for a virtual reality (VR) experience. You want your page or app to display a variety of data that changes over time, like authenticated user info, filterable product lists, data visualization, or customer details. You expect the user to interact with the app, choosing filters and data sets and customers to view, filling in form fields, or even exploring a VR space! Or maybe your app will consume data from a network or from the internet, like social media updates, stock tickers, or product availability. React is here to help.

1.1.1 Building a UI from components

1.1.2 Synchronizing state and UI

1.1.3 Understanding component types

1.2 What’s new in React?

1.3 React Hooks can add state to function components

1.3.1 Stateful function components: Less code, better organization

1.3.2 Custom hooks: Easier code reuse

1.3.3 Third-party hooks provide ready-made, well-tested functionality

1.4 Better UX with Concurrent Mode and Suspense

1.4.1 Concurrent Mode

1.4.2 Suspense

1.5 React’s new publication channels

1.6 Whom is this book for?

1.7 Getting started