title: Typical file structure in Reactjs application: grouping API calls in api.js
body: <p>Just wanted to know how to group all of my API calls altogether in an <strong>api.js</strong> file, in my React App (just some pseudocode would work). I have read an <a href="https://daveceddia.com/react-project-structure/" rel="noreferrer">interesting article</a> that introduces that idea, and I feel curious because that file structure really fits my needs. How would it be?
  Moreover, the author states in a comment:</p>
  
  <blockquote>
    <p><em>I usually just put all of my API calls into that file - they're
    usually small one-or-two-line functions that call out to axios, and I
    just export them.</em></p>
    
    <p><em>export function login(username, password) { ... } export function
    getFolders() { ... } etc.</em></p>
  </blockquote>
  
  <p>But I feel it lacks some details to reproduce it. I am new to Javascript and React. Thanks.</p>