There are three text boxes in my app all three are having same functionality like When onChange Function happened.. I will change the state from empty to the current target value of the text box. I did like below seems to be elementary level. can you please help me to do it in react way?
updateBugChange = (e, type) => {
if(type === 'title')
{
this.setState({ bugTitle : e.target.value })
}
if(type === 'type')
{
this.setState({ bugType : e.target.value })
}
if(type === 'description')
{
this.setState({ bugDescription : e.target.value })
}
}