javascript axios request with params for client side rendering

JavaScript
let params = {
      page: currentPage + 1,
      per_page: rowsPerPage
    }
    axios
      .get('/products', { params: params })
      .then((response) => {
        if (isMountedRef.current) {
          setProducts(response.data.data);
          setMeta(response.data.meta);
        }
      });
Source

Also in JavaScript: