title: variable name of src parameter of image in React
body: <p>How can I define src parameter in React jsx imgage tag? I map an array and I need define src parameter depends on index of array.</p>
  <pre><code>import leaf1 from &quot;../../assets/menu-clip/leafes/leaf1.png&quot;;
  import leaf2 from &quot;../../assets/menu-clip/leafes/leaf2.png&quot;;
  import leaf3 from &quot;../../assets/menu-clip/leafes/leaf3.png&quot;;
  import leaf4 from &quot;../../assets/menu-clip/leafes/leaf4.png&quot;;
  import leaf5 from &quot;../../assets/menu-clip/leafes/leaf5.png&quot;;
  
  
  export default function Menu(props) {
  
  
      const menuList = props.menu.menuList;
  
      return (
          &lt;div className={styles.menuContainer}&gt;
              &lt;ul className={styles.list}&gt;
                  {menuList.map( (m,i) =&gt; (
                      &lt;li className={styles.menuLi}
                          key={i}&gt;
                          {m.name}
                          &lt;img src={  **leaf + (i+1)** }      // ???????
                               alt=&quot;menu lístok&quot;
                               width=&quot;50&quot;/&gt;
                      &lt;/li&gt;
                  )
                  )}
              &lt;/ul&gt;
  
          &lt;/div&gt;
      )
  }
  </code></pre>