, . , , React.
, , , 3, @Colin Whitmarsh.
:
<input id="typeinp" type="range" min="0" max="5" defaultValue="3" step="1"/>
Now you probably need his way out to do something. You can use onChange={this.handleChange}like @xCrZx in your answer. But inside handleChangeyou do not have to update your state. Depending on your logic, you can avoid increasing the complexity of your state and simply encode your logic inside handleChange.
If you do not update the state, you will probably save some renders and your performance will improve.
source
share