score:2

Accepted answer

if you have access to companyid at the front end, all you need to do is

 const response = await axios.get(`clients?id=${companyid}`);

assuming backend express is configured with query parser already.(by default)

may be you can have

const getclients = (companyid) => dispatch => {
  const response = await axios.get(`clients?id=${companyid}`);
  // above code here
}

let me know if you need further follow up.

score:0

you have two options there. first you pass the value of parameter as query string. the other option is to modificate your get request to a post request where you can add request body. the post request is better if you try to pass more value like an object.


Related Query

More Query from same tag