Context provides a way to pass data through the component tree without having to pass props down manually at every level.
https://reactjs.org/docs/context.html
>> single source of truth
Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor.
https://reactjs.org/docs/lifting-state-up.html
Context provides a way to pass data through the component tree without having to pass props down manually at every level. https://reactjs.org/docs/context.html
>> single source of truth
Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor. https://reactjs.org/docs/lifting-state-up.html