New Features
tree shaking
react hook
react fragment
real-time applications
Context API
context is like a global value
use context.provider, then use this.context to get it
https://codesandbox.io/s/contextdemo-di5x7
.When React renders a component that subscribes to this Context object it will read the current context value from the closest matching Provider above it in the tree.
Context.Provider
Context.ProviderContext.Consumer
Context.ConsumerLast updated
Was this helpful?