October 2019
Intermediate to advanced
426 pages
11h 49m
English
The useContext Hook accepts a context object and returns the current value for the context. When the context provider updates its value, the Hook will trigger a re-render with the latest value:
const value = useContext(NameOfTheContext)
It is important to note that the context object itself needs to be passed to the Hook, not the consumer or provider.
Read now
Unlock full access