mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Document displayName
This commit is contained in:
@@ -97,6 +97,9 @@ var MyComponent = React.createClass({/*...*/});
|
|||||||
var app = <MyComponent someProperty={true} />;
|
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.
|
See [Multiple Components](/react/docs/multiple-components.html) to learn more about using composite components.
|
||||||
|
|
||||||
> Note:
|
> Note:
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ The `mixins` array allows you to use mixins to share behavior among multiple com
|
|||||||
<!-- TODO: Document mixins here directly. -->
|
<!-- 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
|
## Lifecycle Methods
|
||||||
|
|
||||||
Various methods are executed at specific points in a component's lifecycle.
|
Various methods are executed at specific points in a component's lifecycle.
|
||||||
|
|||||||
Reference in New Issue
Block a user