---
url: /docs/guide/usage/linter/rules/react/unsupported-syntax.md
---

### What it does

Warns on syntax that React Compiler does not plan to support, such as
`eval`; components and hooks using it are skipped, not optimized.

Powered by the React Compiler, which runs once per file and is shared
with the other React Compiler rules. Port of
[`react-hooks/unsupported-syntax`](https://react.dev/reference/eslint-plugin-react-hooks/lints/unsupported-syntax).

### Why is this bad?

Constructs like `eval` make data flow unanalyzable, so the component
permanently opts out of compiler optimization.

### Examples

Examples of **incorrect** code for this rule:

```jsx
function Component(props) {
  eval("props.x = true");
  return <div />;
}
```

Examples of **correct** code for this rule:

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

## How to use

## Version

This rule was added in v1.79.0.

## References
