Controlled input usage
See original GitHub issueThe code below will cause state change loop although it’s regular in React community (Ex. material-ui components)
onChange(value) {
this.setState({dateValue: value});
}
render() {
return <DatePicker value={@state.dateValue} onChange={this.onChange.bind(this)} />
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
React Controlled Components, the Hooks Way - Dmitri Pavlutin
The controlled components approach can help you access the value of any input type: being regular textual inputs, textareas, select fields. 2.
Read more >Forms - React
With a controlled component, the input's value is always driven by the React state. While this means you have to type a bit...
Read more >Controlled and uncontrolled form inputs in React don't have to ...
A controlled input accepts its current value as a prop, as well as a callback to change that value. You could say it's...
Read more >What is React Controlled Input Components? - eduCBA
In react js control inputs are the input which handles with the help of states and the value of the input captured with...
Read more >What are controlled and/or uncontrolled inputs in React.js
A controlled is not the only way to access and/or update the value of an input, you can also use the useRef hook...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not very clean solution, but I’ve made a PR.
Thanks dude 😃
You are right. Frankly, I do not use this package anymore, specifically the latest version (v3) which I just did for Evand without myself using it in a real project. I’ll try to investigate on this. I can’t really say when, but probably in this month. Meanwhile, PRs are very welcome 😃