I was reading the new documentation for useRef, saw an overcomplicated example, made a PR where I wanted to reference the new docs for uncontrolled components, but for some reason the definition has completely changed from the original docs.
In my opinion, the new definition is wrong. An uncontrolled component is a component where the value is not stored by react at all, but rather stored natively in the DOM element.
The new docs state
It is common to call a component with some local state “uncontrolled”. For example, the original Panel component with an isActive state variable is uncontrolled because its parent cannot influence whether the panel is active or not.
The definiton from old docs:
In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by the DOM itself.
I was reading the new documentation for useRef, saw an overcomplicated example, made a PR where I wanted to reference the new docs for uncontrolled components, but for some reason the definition has completely changed from the original docs.
In my opinion, the new definition is wrong. An uncontrolled component is a component where the value is not stored by react at all, but rather stored natively in the DOM element.
The new docs state
The definiton from old docs:
new docs
Old docs: