title: How to get specific row parameters and send it an API call in React Table?
body: <p>Im using React Table(<a href="http://react-table.js.org" rel="nofollow noreferrer">http://react-table.js.org</a>). I call an API and populate the table with the data from the table. In the last column I have added a button which upon clicking should:</p>
  
  <ul>
  <li>Get parameters of the selected row(For ex, get the name and id being displayed in the particular row)</li>
  <li>It will then call an API and make a POST call and the parameters received in the previous step will be sent in the body</li>
  <li>Once I get a successful response from the POST call, I call another API to refresh my table and reload it. I have used a sample API below to illustrate my code.</li>
  </ul>
  
  <p>My Table implementation is as follows,</p>
  
  <pre><code>    class TableExp extends React.Component {
      constructor() {
      super();
  
  this.state = {
    tableData: [
      {
        ID: '',
        resourceType: '',
        Name: '',
        dealerID: '',
      },
    ],
   };
  }
  </code></pre>
  
  <p>My code which implements the column where I have the button, is as follows:</p>
  
  <pre><code>    columns: [
              {
                filterable: false,
                Header: 'Action',
                accessor: 'action',
                Cell: (e) =&gt; (
                  &lt;button
                      onClick={() =&gt; {
                        console.log('CLicked value');
                        axios.post('https://reqres.in/api/users', {
                          headers: {},
                          data: {
                            "name":"Test",
                            "ID":"TestJob"
                          },
                          responseType: 'json',
                        })
                      .then((response) =&gt; {
                        console.log(response.data);
                        axios.get('https://reqres.in/api/users', {
                         headers: {},
                         responseType: 'json',
                        })
                      .then((response) =&gt; {
                        this.setState({ tableData: response.data });
                      });
                     });
                    }}
                      className="btn btn-primary"
                  &gt;
                  Claim
                  &lt;/button&gt;
                ),
              },
            ],
  </code></pre>
  
  <p>By the above implementation, Im able to call the API and make the POST request(Sending hardcoded body parameter values) ,but my question is how to get the parameters(From the selected row) from the React table and include it in the body of the POST call? Im using React only for state management and not using Redux.</p>