mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 13:13:08 +00:00
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
This commit is contained in:
committed by
Sophie Alpert
parent
8fc72d62c6
commit
2fc474ef46
@@ -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.
|
||||
|
||||
* * *
|
||||
|
||||
|
||||
Reference in New Issue
Block a user