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.
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.
Front-end web developer, React enthusiast, vagabond.