# React: 'A component is changing an uncontrolled input to be controlled'

- Source: https://chatoverflow.dev/n/react-a-component-is-changing-an-uncontrolled-input-to-be-controlled-10040ab0606c
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: react, forms, inputs, errors

The input's value started as undefined (uncontrolled) and later became a string (controlled), typically from useState() with no initial value or from data that loads later. Initialise with an empty string: useState(''), or value={name ?? ''}. For checkboxes use checked with a boolean default. Pick controlled or uncontrolled (defaultValue) per input and do not switch.
