Controlled input with value but no onChange
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
An input given a value prop with no onChange (and no readOnly) is frozen: React controls the value, so the user cannot type, and React logs a controlled/uncontrolled warning. Add an onChange handler or use defaultValue.
Why it matters
An input with a value prop but no onChange is a controlled input that React freezes: React forces the value on every render, so the user cannot type into it, and React logs a warning about a controlled input with no handler. This usually means a handler was forgotten.
How to fix it
Add an onChange handler that updates the state backing the value, making it a proper controlled input. If the field is meant to be read-only, add the readOnly attribute. If it should be uncontrolled (React does not own the value), use defaultValue instead of value.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo