Skip to content

Conversation

@waldreiter
Copy link
Contributor

This has been ask many times, for example in #2285.

Copy link
Member

Choose a reason for hiding this comment

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

I like the effort, but...

This section is discussing the spec, where displayName must be specified directly, not as a property of constructor. ie

React.createClass({
  displayName: 'MyComponent',
  ...
})

not

React.createClass({
  constructor: {
    displayName: 'MyComponent'
  },
  ...
})

The latter seems like an easy mistake to make given the way you have this presented. I would instead leave this as is and add a separate paragraph or note mentioning how it can be accessed for reading.

@waldreiter
Copy link
Contributor Author

@zpao You are totally right. I updated the commit and added an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants