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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -