Add image src dynamically in React JS App

Use dynamic data inside the src url in react JS . How to use data from variables or inputs in the url, here is the sample code for creating dynamic urls in React js.

<img src={`../images/card-icons/${item.imgURL}`} />
<img  src={`../images/card-icons/${item.imgURL}`} />

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *