Skip to content

deepak00944/React.js

Repository files navigation

Context Api

Example

  • Suppose that we are creating a dashboard for a company or project in that there is two sections Left and Right and in Right section there are two sections top and bottom and in top there is on card, so in general if we want pass any data in that card so we have to pass the data in all the components in main component and in all of its child components which is not optimized process or practise so what if there is one Global Object in which we can givee the value and all component can ask to it directly toh hume pass karne ki jarurat hi nhi hoti toh isi ke liye context Api available h just not this there are many librabry available for this

Steps to Create context

  • Create context
  • create provider

About

Learning React from hitesh sir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors