title: React getting prop into child
body: <p>I'm having trouble getting a prop to a child component.
  I'm calling the function like:</p>
  <pre><code>&lt;ShowMedal debnr='55555' /&gt;
  </code></pre>
  <p>In the console I see the property is being passed.</p>
  <p>Then in the ShowMedal component I want to pass the debnr to my API call, but it's not working.</p>
  <pre><code>import React, { useEffect, useState } from &quot;react&quot;;
  
  const ShowMedal = () =&gt; {
  
      const [mpstotal, setMpsTotal] = useState([]);
      const [ordertotal, setOrderTotal] = useState([]);
  
      const getMpsTotal = async () =&gt; {
          try {
              const response = await fetch(`http://localhost:5000/mpstotal/${this.props.debnr}`);
              const jsonData = await response.json();
  
              setMpsTotal(jsonData);
          } catch (err) {
              console.error(err.message);
          }
      };
  
      useEffect(() =&gt; {
          getMpsTotal();
      }, []);
  </code></pre>
  <p>What am I doing wrong here? :)</p>