title: React Native component does not render
body: <p>I have the following React Native component:</p>
  <pre><code>import React, {useContext} from 'react';
  import {View, Headline} from 'react-native';
  import ShoppingCartEntry from './ShoppingCartEntry';
  import ShoppingCartContext from '../../context/shoppingCart/shoppingCartContext';
  
  const ShoppingCartList = () =&gt; {
    const {shoppingCart} = useContext(ShoppingCartContext);
  
    const TotalPriceDisplay = () =&gt; {
      let totalPrice = 0;
  
      shoppingCart.map((entry) =&gt; {
        totalPrice = totalPrice + (entry.product.price * entry.amount);
      })
  
      return (
        &lt;View&gt;
          &lt;Headline&gt;Total: {Intl.NumberFormat('US', { style: 'currency', currency: 'USD' }).format(totalPrice)}&lt;/Headline&gt;
        &lt;/View&gt;
      )
    }
  
    return (
      &lt;View&gt;
        &lt;View&gt;
          {shoppingCart.map((entry) =&gt; {
            return (
              &lt;ShoppingCartEntry entry={entry} /&gt;
            )
          })}
        &lt;/View&gt;
        &lt;View&gt;
          &lt;TotalPriceDisplay /&gt;
        &lt;/View&gt;
      &lt;/View&gt;
    )
  }
  
  export default ShoppingCartList;
  </code></pre>
  <p>But it rises the following error:</p>
  <pre><code>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  
  Check the render method of `TotalPriceDisplay`
  </code></pre>
  <p>Can't find where is the error coming from.</p>