# react/no-redundant-should-component-update
📝 Disallow usage of shouldComponentUpdate when extending React.PureComponent.
Warns if you have `shouldComponentUpdate` defined when defining a component that extends React.PureComponent.
While having `shouldComponentUpdate` will still work, it becomes pointless to extend PureComponent.
## Rule Details
Examples of **incorrect** code for this rule:
```jsx
class Foo extends React.PureComponent {
shouldComponentUpdate() {
// do check
}
render() {
return
Radical!
}
}
function Bar() {
return class Baz extends React.PureComponent {
shouldComponentUpdate() {
// do check
}
render() {
return Groovy!
}
}
}
```
Examples of **correct** code for this rule:
```jsx
class Foo extends React.Component {
shouldComponentUpdate() {
// do check
}
render() {
return Radical!
}
}
function Bar() {
return class Baz extends React.Component {
shouldComponentUpdate() {
// do check
}
render() {
return Groovy!
}
}
}
class Qux extends React.PureComponent {
render() {
return Tubular!
}
}
```