Yes, if you only need to pass state change one or two levels or with very few children, pass setState as prop will be fine.
But, if you need to manage complex state, use Context API with useReduer hook in the container component will be easier to maintain and scale. Or use other state management lib like redux
Yes, if you only need to pass state change one or two levels or with very few children, pass setState as prop will be fine.
But, if you need to manage complex state, use Context API with useReduer hook in the container component will be easier to maintain and scale. Or use other state management lib like redux
i agree