# jsx-no-new-array-as-prop

Rule `react-perf/jsx-no-new-array-as-prop`. Prevent [...] as JSX prop value

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react-perf/jsx-no-new-array-as-prop` | no | no | package `eslint-plugin-react-perf` | [docs](https://github.com/cvazac/eslint-plugin-react-perf/blob/master/docs/rules/jsx-no-new-array-as-prop.md) |
| Oxlint | `react-perf/jsx-no-new-array-as-prop` | no | no | plugin `react-perf`, category perf | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react_perf/jsx-no-new-array-as-prop.html) |

## Code examples

### Incorrect: the rule reports this

```jsx
<Item list={[]} />
<Item list={new Array()} />
<Item list={Array()} />
<Item list={this.props.list || []} />
<Item list={this.props.list ? this.props.list : []} />
```

### Correct: the rule accepts this

```jsx
<Item list={this.props.list} />
```

Examples from the Oxlint documentation.

## Enable it

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

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

export default [
  {
    plugins: { "react-perf": reactPerf },
    rules: {
      "react-perf/jsx-no-new-array-as-prop": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react-perf"
  ],
  "rules": {
    "react-perf/jsx-no-new-array-as-prop": "error"
  }
}
```

## Related rules

- [react-perf/jsx-no-jsx-as-prop](https://lintradar.dev/rules/react-perf/jsx-no-jsx-as-prop.md): Prevent JSX as JSX prop value
- [react-perf/jsx-no-new-function-as-prop](https://lintradar.dev/rules/react-perf/jsx-no-new-function-as-prop.md): Prevent `function` as JSX prop value
- [react-perf/jsx-no-new-object-as-prop](https://lintradar.dev/rules/react-perf/jsx-no-new-object-as-prop.md): Prevent {...} as JSX prop value

---

Web page: https://lintradar.dev/rules/react-perf/jsx-no-new-array-as-prop. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
