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

### What it does

Reports invalid JavaScript encountered by React Compiler while
analyzing a component or hook, such as reassigning a `const` binding.

Powered by the React Compiler, which runs once per file and is shared
with the other React Compiler rules. Port of
`react-hooks/syntax`.

### Why is this bad?

The code would throw at runtime; the compiler skips the function
instead of optimizing it.

## How to use

## Version

This rule was added in v1.79.0.

## References
