# no-deriving-state-in-effects

Rule `react-hooks/no-deriving-state-in-effects`. Validates against deriving values from state in an effect

- Source: react-hooks
- Technologies: React
- Kind: performance
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1712 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react-hooks/no-deriving-state-in-effects` | no | safe | package `eslint-plugin-react-hooks` | [docs](https://react.dev/reference/eslint-plugin-react-hooks/lints/no-deriving-state-in-effects) |
| Oxlint | `react/no-deriving-state-in-effects` | no | no | plugin `react`, category perf | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/no-deriving-state-in-effects.html) |

## Enable it

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

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

export default [
  {
    plugins: { "react-hooks": reactHooks },
    rules: {
      "react-hooks/no-deriving-state-in-effects": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/no-deriving-state-in-effects": "error"
  }
}
```

## Related rules

- [react-hooks/memo-dependencies](https://lintradar.dev/rules/react-hooks/memo-dependencies.md): Validates that useMemo() and useCallback() specify comprehensive dependencies without extraneous values. See `useMemo()` docs for more information.
- [react-hooks/rule-suppression](https://lintradar.dev/rules/react-hooks/rule-suppression.md): Validates against suppression of other rules
- [react-hooks/invariant](https://lintradar.dev/rules/react-hooks/invariant.md): Internal invariants
- [react-hooks/syntax](https://lintradar.dev/rules/react-hooks/syntax.md): Validates against invalid syntax
- [react-hooks/hooks](https://lintradar.dev/rules/react-hooks/hooks.md): Validates the rules of hooks
- [react-hooks/todo](https://lintradar.dev/rules/react-hooks/todo.md): Unimplemented features

---

Web page: https://lintradar.dev/rules/react-hooks/no-deriving-state-in-effects. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
