Michael Landis
May 23, 2023

--

I'd argue that this is the primary reason to use Context. Any child component can use it without requiring a specific component structure. For more complex logic, I'd use useReducer and send its dispatch method along with the state.

--

--

Michael Landis
Michael Landis

Written by Michael Landis

Front-end web developer, React enthusiast, vagabond.

No responses yet