# forward-ref-uses-ref

Rule `react/forward-ref-uses-ref`. Require all forwardRef components include a ref parameter

- Source: react
- Technologies: React
- Kind: correctness
- 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: #1720 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/forward-ref-uses-ref` | no | suggestion | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forward-ref-uses-ref.md) |
| Oxlint | `react/forward-ref-uses-ref` | no | safe | plugin `react`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/forward-ref-uses-ref.html) |

## Code examples

### Incorrect: the rule reports this

```jsx
var React = require('react');

var Component = React.forwardRef((props) => (
  <div />
));
```

### Correct: the rule accepts this

```jsx
var React = require('react');

var Component = React.forwardRef((props, ref) => (
  <div ref={ref} />
));

var Component = React.forwardRef((props, ref) => (
  <div />
));

function Component(props) {
  return <div />;
};
```

Examples from the Oxlint documentation.

## Enable it

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

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

export default [
  {
    plugins: { react },
    rules: {
      "react/forward-ref-uses-ref": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/forward-ref-uses-ref": "error"
  }
}
```

## Related rules

- [react/forbid-dom-props](https://lintradar.dev/rules/react/forbid-dom-props.md): Disallow certain props on DOM Nodes
- [react/hook-use-state](https://lintradar.dev/rules/react/hook-use-state.md): Ensure destructuring and symmetric naming of useState hook value and setter variables
- [react/forbid-component-props](https://lintradar.dev/rules/react/forbid-component-props.md): Disallow certain props on components
- [react/jsx-handler-names](https://lintradar.dev/rules/react/jsx-handler-names.md): Enforce event handler naming conventions in JSX
- [react/checked-requires-onchange-or-readonly](https://lintradar.dev/rules/react/checked-requires-onchange-or-readonly.md): Enforce using `onChange` or `readonly` attribute when `checked` is used
- [react/jsx-max-depth](https://lintradar.dev/rules/react/jsx-max-depth.md): Enforce JSX maximum depth

---

Web page: https://lintradar.dev/rules/react/forward-ref-uses-ref. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
