contextType
Learn how to access values from Context Providers by using the contextType property instead of making a separate Consumer component.
We'll cover the following...
Why use contextType
?
While using class components, we can employ a trick that allows us to avoid building another Consumer component bloating our component tree further.
To do this, we can use contextType
...