Answers for "react img src to default when not fetched"

0

how to add alternate image in img tag in react

<img src={record.picture} onError={(e)=>{e.target.onerror = null; e.target.src="image_path_here"}}/>
Posted by: Guest on December-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language