<SuperComponent>    <ChildComponent />    <ChildComponent />  </SuperComponent>  Assuming we have an context controlled by a reducer, and it's an object that contains needed data for all ChildComponents. And let's assume instead of 2 children, we have like 10-15 children.
Is it better to call useContext once in SuperComponent then pass the needed data to children as props, or call useContext in each ChildComponent individually?
 
没有评论:
发表评论