javascript - Replace element with new one in React.js -
i'm trying replace <input>
element new one, in order clear it. in render method:
let fileinput = null fileinput = ( <input id={this.props.name} key={performance.now()} accept="image/*" onchange={this.handlechange.bind(this)} type="file"/> ) return fileinput
render()
called each time select item (due component updating info displayed) , therefore should replace <input>
new one, doesn't. why?
Comments
Post a Comment