# noReactForwardRef

Rule `biome/noReactForwardRef`. Replaces usages of `forwardRef` with passing `ref` as a prop.

- Source: biome
- Technologies: React
- Kind: suspicious
- 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: #1930 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `suspicious/noReactForwardRef` | no | unsafe | group suspicious, since 2.2.5 | [docs](https://biomejs.dev/linter/rules/no-react-forward-ref/) |

## Code examples

### Incorrect: the rule reports this

```jsx
import { forwardRef } from "react";

const MyInput = forwardRef(function MyInput(props, ref) {
  return <input ref={ref} {...props} />;
});
```

```jsx
import { forwardRef } from "react";

const MyInput = forwardRef((props, ref) => {
  return <input ref={ref} {...props} />;
});
```

### Correct: the rule accepts this

```jsx
function MyInput({ ref, ...props }) {
  return <input ref={ref} {...props} />;
}
```

```jsx
const MyInput = ({ ref, ...props }) => {
  return <input ref={ref} {...props} />;
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noReactForwardRef": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noPseudoElementInFunctionalPseudoClass](https://lintradar.dev/rules/biome/noPseudoElementInFunctionalPseudoClass.md): Disallow pseudo-elements inside `:is()`, `:where()`, `:not()` and `:has()`.
- [biome/noReactNativeLiteralColors](https://lintradar.dev/rules/biome/noReactNativeLiteralColors.md): Disallow color literals in React Native styles.
- [biome/noProcessGlobal](https://lintradar.dev/rules/biome/noProcessGlobal.md): Disallow the use of `process` global.
- [biome/noReactPropAssignments](https://lintradar.dev/rules/biome/noReactPropAssignments.md): Disallow assigning to React component props.
- [biome/noPlaywrightWaitForTimeout](https://lintradar.dev/rules/biome/noPlaywrightWaitForTimeout.md): Disallow using `page.waitForTimeout()`.
- [biome/noReExportAll](https://lintradar.dev/rules/biome/noReExportAll.md): Avoid re-export all.

---

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