Chapter 5. Proper Data Fetching

The goal of this chapter is to show the different data fetching patterns that we can put in place in a React application.

To find the best strategy, we have to clearly understand how the data flows within a tree of components in React.

It is important to know how the parent can communicate with its children and the other way around. It is also crucial to understand how unconnected siblings can share their data.

We will see some real-world examples of data fetching, transforming a base component into a well-structured one using HoCs.

Finally, we will see how existing libraries such as react-refetch can save us a lot of time by providing the core data fetching functionalities we need.

In this chapter, we will cover the ...

Get React Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.