title: How to use map method in reactjs
body: <p>Output is not showing in the browser while using map method but it is showing while calling elements one by one from array. Answer please</p>
  <pre><code>const App = () =&gt; {
    const items = [
      {
        title:&quot;University Expenses&quot;,
        amount:267
      },
      {
        title:&quot;Car Insurance&quot;,
        amount:1200
      },
      {
        title:&quot;Bike Expenses&quot;,
        amount:5000
      }
    ]
    return(
      &lt;&gt;
    {items.map(( val , i )=&gt;{
        &lt;ExpenseItem key={i} title = {val.title} amount = {val.amount}/&gt;
    })}
    &lt;/&gt;
    )
  }
  </code></pre>
  <p>Code of ExpenseItem component</p>
  <pre><code>import React from &quot;react&quot;;
  
  const ExpenseItem = (props) =&gt; {
    return (
      &lt;&gt;
        &lt;div className=&quot;expense_div&quot;&gt;
           &lt;h2&gt;{props.title}&lt;/h2&gt; 
          &lt;div&gt;
            &lt;button&gt;${props.amount}&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/&gt;
    )
  };
  
  export default ExpenseItem
  </code></pre>