diff --git a/content/docs/context.md b/content/docs/context.md index e421eef0..391c21be 100644 --- a/content/docs/context.md +++ b/content/docs/context.md @@ -48,7 +48,7 @@ const {Provider, Consumer} = React.createContext(defaultValue); Creates a `{ Provider, Consumer }` pair. When React renders a context `Consumer`, it will read the current context value from the closest matching `Provider` above it in the tree. -The `defaultValue` argument is used when you render a Consumer without a matching Provider above it in the tree. This can be helpful for testing components in isolation without wrapping them. +The `defaultValue` argument is **only** used by a Consumer when it does not have a matching Provider above it in the tree. This can be helpful for testing components in isolation without wrapping them. Note: passing `undefined` as a Provider value does not cause Consumers to use `defaultValue`. ### `Provider`