Mastering React Context: Do you NEED a state manager?

Jack Herrington

Context in React is a super valuable tool, but can it replace a state manager? Let’s find out!

Daishi’s Book: https://www.amazon.com/gp/product/1801812373
Code: https://github.com/jherr/mastering-context

👉 I’m a host on the React Round-Up podcast: https://devchat.tv/podcasts/react-round-up/
👉 Don’t forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup: https://discord.gg/ddMZFtTDa5
👉 VS Code theme and font? Night Wolf [black] and Operator Mono
👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF

0:00 Introduction
0:32 Project Setup
1:14 Prop Drilling
5:03 Context Using Prop Drilling
9:21 Multiple Contexts
10:38 Context Using useReducer
13:45 When To NOT Use Context
15:00 Context Versus State Managers
17:18 State Management With Zustand
22:13 Adding A Facade Layer
24:19 Fine-Grained Updates
25:38 Replacing Zustand With Context
29:37 When Context Updates Components
30:10 Context Using use-context-selector
32:40 Referential Identity Matters
35:03 Recommendations