State Management · Middle · Question 4 of 75

How do you pass dispatch from useReducer deep into the tree without prop drilling?

Explanation

The "reducer + context" pattern: one context for state, another for dispatch. Components that only send actions (buttons, forms) read the stable dispatch context and don't re-render when the state changes.

Further reading

Problem with a question

State Management · Middle · question 4

Test yourself

Take the State Management · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz