Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document displayName #811

Merged
merged 1 commit into from
Jan 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/docs/02.1-jsx-in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/ref-03-component-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to start the href with '/' here, see #841



## Lifecycle Methods

Various methods are executed at specific points in a component's lifecycle.
Expand Down