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
Héliton Nordt committed
Sep 9, 2017 at 11:45 UTC
617f8810ba8e5ce6ba2f2917e06eea3425b2e0d5
1 file changed
+1
-1
docs/docs/reference-react-component.md
+1
-1
@@ -343,7 +343,7 @@ If `props.color` is set to null, it will remain null:
343
344
### `displayName`
345
346
-The `displayName` string is used in debugging messages. JSX sets this value automatically; see [JSX in Depth](/react/docs/jsx-in-depth.html).
346
+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.
347
348
* * *
349