title: How to pass argument to useEffect hook
body: <p>I have several buttons that when clicked call different APIs. My react App only uses Hooks and Context APIs. 
  Before, it was as below:</p>
  
  <pre><code>      &lt;button class="btn margin-1-lr" onClick={this.couchbaseCallApi('/couchbase/sync/initiate/sanity')}&gt;Sync Sanity&lt;/button&gt;
            &lt;button class="btn margin-1-lr" onClick={this.couchbaseCallApi('/couchbase/sync/initiate/performance')}&gt;Sync Performance&lt;/button&gt;
            &lt;button class="btn margin-1-lr" onClick={this.couchbaseCallApi('/couchbase/sync/initiate/endurance')}&gt;Sync Endurance&lt;/button&gt;
  </code></pre>
  
  <p>Where couchbaseCallApi function would use the fetch API to call the URL.</p>
  
  <p>How can I pass these endpoints to a useEffect hook to call the correct endpoint?</p>