how to add alternate image in img tag in react

Solutions on MaxInterview for how to add alternate image in img tag in react by the best coders in the world

showing results for - "how to add alternate image in img tag in react"
Paul
26 Jan 2021
1<img src={record.picture} onError={(e)=>{e.target.onerror = null; e.target.src="image_path_here"}}/>
2