mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Document displayName
This commit is contained in:
@@ -97,6 +97,9 @@ var MyComponent = React.createClass({/*...*/});
|
||||
var app = <MyComponent someProperty={true} />;
|
||||
```
|
||||
|
||||
JSX will infer the component's name from the variable assignment and specify
|
||||
the class's [displayName](/react/docs/component-specs.html#displayName) accordingly.
|
||||
|
||||
See [Multiple Components](/react/docs/multiple-components.html) to learn more about using composite components.
|
||||
|
||||
> Note:
|
||||
|
||||
@@ -67,6 +67,15 @@ The `mixins` array allows you to use mixins to share behavior among multiple com
|
||||
<!-- TODO: Document mixins here directly. -->
|
||||
|
||||
|
||||
### displayName
|
||||
|
||||
```javascript
|
||||
string displayName
|
||||
```
|
||||
|
||||
The `displayName` string is used in debugging messages. JSX sets this value automatically, see [JSX in Depth](react/docs/jsx-in-depth.html#react-composite-components).
|
||||
|
||||
|
||||
## Lifecycle Methods
|
||||
|
||||
Various methods are executed at specific points in a component's lifecycle.
|
||||
|
||||
Reference in New Issue
Block a user