https://reactjs.org/docs/context.html
Context is one of the most important part of react framework
Context provide a api to pass global properties in a react dom tree and commonly used where you need to pass similar properties between components.
1. example passing laungugae or currency sign between component.
2. passing same theme across nested components
3. passing global properties across nested component.
working exmaple
https://stackblitz.com/edit/react-hmqbvz?file=index.js
Context is one of the most important part of react framework
Context provide a api to pass global properties in a react dom tree and commonly used where you need to pass similar properties between components.
1. example passing laungugae or currency sign between component.
2. passing same theme across nested components
3. passing global properties across nested component.
working exmaple
https://stackblitz.com/edit/react-hmqbvz?file=index.js
Comments
Post a Comment