December 2019
Intermediate to advanced
598 pages
12h 21m
English
A React context is a way to pass data through the component tree without passing it through component props. A context is created and provided at the appropriate place in the component tree for other components lower in the tree to consume:

The preceding diagram shows several components in a tree. A context called FormContext has been created and provided within the Form component via the Provider component within FormContext. Every component beneath FormContext.Provider in the component tree can consume FormContext via the Consumer component within FormContext. Components A, B, C, D, E, and F cannot consume ...
Read now
Unlock full access