# useReactFunctionComponents

Rule `biome/useReactFunctionComponents`. Enforce that components are defined as functions and never as classes.

- Source: biome
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1965 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/useReactFunctionComponents` | no | no | group style, since 2.1.3 | [docs](https://biomejs.dev/linter/rules/use-react-function-components/) |

## Code examples

### Incorrect: the rule reports this

```jsx
class Foo extends React.Component {
  render() {
    return (
      <div>This is a class component.</div>
    );
  }
}
```

### Correct: the rule accepts this

```jsx
function Foo() {
  return <div>This is a function component.</div>;
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useReactFunctionComponents": "error"
      }
    }
  }
}
```

## Related rules

- [biome/useReactCompiler](https://lintradar.dev/rules/biome/useReactCompiler.md): Validate files with React Compiler.
- [biome/useReactNamingConvention](https://lintradar.dev/rules/biome/useReactNamingConvention.md): Enforces naming conventions for React `createContext`, `useId`, and `useRef`.
- [biome/usePackageJsonEngines](https://lintradar.dev/rules/biome/usePackageJsonEngines.md): Require the `engines` field in `package.json`.
- [biome/useSolidForComponent](https://lintradar.dev/rules/biome/useSolidForComponent.md): Enforce using Solid's `<For />` component for mapping an array to JSX elements.
- [biome/usePackageJsonCpu](https://lintradar.dev/rules/biome/usePackageJsonCpu.md): Require the `cpu` field in `package.json`.
- [biome/useSvelteStoreInitialValue](https://lintradar.dev/rules/biome/useSvelteStoreInitialValue.md): Require Svelte stores to be created with an initial value.

---

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