Skip to content

Commit

Permalink
mention ignorePureComponents earlier
Browse files Browse the repository at this point in the history
When describing `PureComponent` behavior in the Rule Details section, it takes a lot more reading to realize it's a flag you must set to true.
  • Loading branch information
gnarf committed Oct 28, 2016
1 parent 99cec3e commit 6153123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/prefer-stateless-function.md
Expand Up @@ -8,7 +8,7 @@ This rule will check your class based React components for

* methods/properties other than `displayName`, `propTypes`, `render` and useless constructor (same detection as ESLint [no-useless-constructor rule](http://eslint.org/docs/rules/no-useless-constructor))
* instance property other than `this.props` and `this.context`
* extension of `React.PureComponent` ()
* extension of `React.PureComponent` (if the `ignorePureComponents` flag is true)
* presence of `ref` attribute in JSX
* `render` method that return anything but JSX: `undefined`, `null`, etc. (only in React <15.0.0, see [shared settings](https://github.com/yannickcr/eslint-plugin-react/blob/master/README.md#configuration) for React version configuration)

Expand Down

0 comments on commit 6153123

Please sign in to comment.