Skip to content

Commit 6153123

Browse files
authored
mention ignorePureComponents earlier
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.
1 parent 99cec3e commit 6153123

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/rules/prefer-stateless-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This rule will check your class based React components for
88

99
* 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))
1010
* instance property other than `this.props` and `this.context`
11-
* extension of `React.PureComponent` ()
11+
* extension of `React.PureComponent` (if the `ignorePureComponents` flag is true)
1212
* presence of `ref` attribute in JSX
1313
* `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)
1414

0 commit comments

Comments
 (0)