Const
A typed context whose provider takes the context fields as props. useContext throws a message naming the consumer and root when no provider is mounted and no default was given.
useContext
Optional
A typed context whose provider takes the context fields as props.
useContextthrows a message naming the consumer and root when no provider is mounted and no default was given.