I was adding dynamic values to the input file in react then I tried to edit that but it not at all editable.
var shop_profile_data = this.state.data.DETAILS
The below code show how we can make an input tag editable in reactjs.
import React from 'react';
import { render } from 'react-dom';
class App extends React.Component{
constructor(props){
super(props);
this.state = {
data: 2016
}
}
_handleChangeEvent(val) {
return val;
}
render(){
return (
{this._handleChangeEvent(this.state.data);}}
defaultValue={this.state.data} />
);
}
}
render( , document.getElementById('app'));