React Context API

Kindly help me to solve this issue.

I need to pass the variable from one component (file) to the state that is located in another component (file) so that I could access the variable via consumer in all the other files.
Thanks in Advance

I’m very much thankful if anyone shares the resource for React context API completely

Why don’t you just google it? https://reactjs.org/docs/context.html
How many component down that you need to pass? If just one to three, i think using props will do.