title: How can I pass the current logged in user credentials eg the username to the props?
body: <p>I wish to get the username and user ID of the current logged in user and pass them to the <code>&lt;Comments /&gt;</code> component as props. Currently I have hard code the the values like this <code>&lt;Comments username='Vincent', user_id=1</code>.
  How do I automat this process, so that the values are passed automatically depending on the current logged in user?</p>
  <blockquote>
  <p>In my CommentsApp I have this:</p>
  </blockquote>
  <pre><code>... 
  import Comments from './Comments'
  
  
  const CommentsApp = () =&gt; {
      const [backendComments, setBackendComments] = useState([])
      // console.log('backendComments', backendComments)
  
      useEffect(() =&gt; {
          axios.get('http://127.0.0.1:8000/api/comments/')
              .then(res =&gt; {
                  setBackendComments(res.data)
              })
              .catch(err =&gt; {
                  console.log(err)
              })
      }, [])
  
      return (
          &lt;div&gt;
              &lt;Comments user_id='1' username='Vincent' /&gt;
          &lt;/div&gt;
      );
  }
  
  export default CommentsApp;
  </code></pre>