Part 2: Basic Approaches to the Global State
There are several approaches to using the global state effectively in React. Our focus is on optimizing re-renders. This is important because a global state can be used by multiple components. We describe three patterns – using Context, using Subscription, and using both Context and Subscription. We discuss how those patterns address the optimizing of re-renders.
This part comprises the following chapters:
- Chapter 2, Using Local and Global States
- Chapter 3, Sharing Component State with Context
- Chapter 4, Sharing Module State with Subscription
- Chapter 5, Sharing Component State with Context and Subscription