Browse Source

Fix a grammatical error in Context.md (#3352)

main
Sam Bigelow 4 years ago
committed by GitHub
parent
commit
21fe4c829b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/context.md

2
content/docs/context.md

@ -128,7 +128,7 @@ The `defaultValue` argument is **only** used when a component does not have a ma
Every Context object comes with a Provider React component that allows consuming components to subscribe to context changes.
Accepts a `value` prop to be passed to consuming components that are descendants of this Provider. One Provider can be connected to many consumers. Providers can be nested to override values deeper within the tree.
The Provider component accepts a `value` prop to be passed to consuming components that are descendants of this Provider. One Provider can be connected to many consumers. Providers can be nested to override values deeper within the tree.
All consumers that are descendants of a Provider will re-render whenever the Provider's `value` prop changes. The propagation from Provider to its descendant consumers (including [`.contextType`](#classcontexttype) and [`useContext`](/docs/hooks-reference.html#usecontext)) is not subject to the `shouldComponentUpdate` method, so the consumer is updated even when an ancestor component skips an update.

Loading…
Cancel
Save