> Notice how we just used Redux without running npm install. Wow!
Alper Ortac
111

Then you can move this reducer into the closest common ancestor component, and pass dispatch down as a prop to child components. It’s exactly the same state hoisting pattern that React uses, except moving reducers up or below is less work than changing a bunch of methods with setState() calls. Again, not saying you should necessarily do that, but you can.

Like what you read? Give Dan Abramov a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.