Why can't I change my input value in React even with the onChange listener

前端 未结 6 1198
再見小時候
再見小時候 2021-02-05 00:20

I am quite new to React and after going through some tutorials, I was trying the below code of mine.

I made one component, passed props to it from a store, on compo

6条回答
  •  醉话见心
    2021-02-05 00:25

    In react, state will not change until you do it by using this.setState({});. That is why your console message showing old values.

提交回复
热议问题