# no-redundant-should-component-update

Rule `react/no-redundant-should-component-update`. Disallow usage of shouldComponentUpdate when extending React.PureComponent

- Source: react
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 3.4M weekly downloads of presets that enable it
- Trend: +2.6% last quarter
- Rank: #1422 by reach, #1558 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/no-redundant-should-component-update` | no | no | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md) |
| Oxlint | `react/no-redundant-should-component-update` | no | no | plugin `react`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/no-redundant-should-component-update.html) |

## Code examples

### Incorrect: the rule reports this

```jsx
class Foo extends React.PureComponent {
  shouldComponentUpdate() {
    // do check
  }

  render() {
    return <div>Radical!</div>
  }
}

function Bar() {
  return class Baz extends React.PureComponent {
    shouldComponentUpdate() {
      // do check
    }

    render() {
      return <div>Groovy!</div>
    }
  }
}
```

### Correct: the rule accepts this

```jsx
class Foo extends React.Component {
  shouldComponentUpdate() {
    // do check
  }

  render() {
    return <div>Radical!</div>
  }
}

function Bar() {
  return class Baz extends React.Component {
    shouldComponentUpdate() {
      // do check
    }

    render() {
      return <div>Groovy!</div>
    }
  }
}

class Qux extends React.PureComponent {
  render() {
    return <div>Tubular!</div>
  }
}
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import react from "eslint-plugin-react";

export default [
  {
    plugins: { react },
    rules: {
      "react/no-redundant-should-component-update": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/no-redundant-should-component-update": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [react/no-namespace](https://lintradar.dev/rules/react/no-namespace.md): Enforce that namespaces are not used in React elements
- [react/no-this-in-sfc](https://lintradar.dev/rules/react/no-this-in-sfc.md): Disallow `this` from being used in stateless functional components
- [react/jsx-no-constructed-context-values](https://lintradar.dev/rules/react/jsx-no-constructed-context-values.md): Disallows JSX context provider values from taking values that will cause needless rerenders
- [react/prefer-es6-class](https://lintradar.dev/rules/react/prefer-es6-class.md): Enforce ES5 or ES6 class for React Components
- [react/jsx-no-script-url](https://lintradar.dev/rules/react/jsx-no-script-url.md): Disallow usage of `javascript:` URLs
- [react/static-property-placement](https://lintradar.dev/rules/react/static-property-placement.md): Enforces where React component static properties should be positioned.

---

Web page: https://lintradar.dev/rules/react/no-redundant-should-component-update. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
