Browse Source

Improve displayName documentation (#10451)

* Improve displayName documentation

* displayName docs: higher-order component lowercased to stay consistent with the rest of the docs

* Rephrase displayName reference docs
main
Héliton Nordt 8 years ago
committed by Sophie Alpert
parent
commit
2fc474ef46
  1. 2
      docs/reference-react-component.md

2
docs/reference-react-component.md

@ -343,7 +343,7 @@ If `props.color` is set to null, it will remain null:
### `displayName`
The `displayName` string is used in debugging messages. JSX sets this value automatically; see [JSX in Depth](/react/docs/jsx-in-depth.html).
The `displayName` string is used in debugging messages. Usually, you don't need to set it explicitly because it's inferred from the name of the function or class that defines the component. You might want to set it explicitly if you want to display a different name for debugging purposes or when you create a higher-order component, see [Wrap the Display Name for Easy Debugging](/react/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging) for details.
* * *

Loading…
Cancel
Save