react-redux-realworld-example-app icon indicating copy to clipboard operation
react-redux-realworld-example-app copied to clipboard

Forms are changing uncontrolled input of type text to controlled.

Open hhsadiq opened this issue 8 years ago • 0 comments

In application, the forms are changing uncontrolled input of type text to controlled. Here is error screenshot.

image

It can be fixed if we add default values in render(). For example in Register.js

Change this

    const email = this.props.email;
    const password = this.props.password;
    const username = this.props.username;

to

    const email = this.props.email || '';
    const password = this.props.password || '';
    const username = this.props.username || '';

hhsadiq avatar Feb 11 '17 05:02 hhsadiq