stop multiple api call when page refreshes in product listing page
useEffect(() => {
alert("query params changed");
console.log(location.search);
const params = new URLSearchParams(location.search);
if(location.search){
const brands = params.get('brand');
// console.log(brands);
const colors = params.get('color');
/...
argha10.hashnode.dev1 min read