Skip to content

The warning for uncontrolled -> controlled inputs is confusing #17069

@vcarl

Description

@vcarl

Do you want to request a feature or report a bug?

Bug? Mild DX improvement.

What is the current behavior?

Creating an input with an undefined or null value, then later passing a string value, triggers a warning about controlled inputs.

A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa)

It's my experience in Reactiflux that this warning is unclear to developers with less familiarity with React, or at least with the "controlled" and "uncontrolled" terms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions