react get url Querystring
const urlParams = new URLSearchParams(window.location.search);
const page = urlParams.get('page');
Relieved Raccoon
const urlParams = new URLSearchParams(window.location.search);
const page = urlParams.get('page');
const getQueryParams = () => window.location.search.replace('?', '').split('&').reduce((r,e) => (r[e.split('=')[0]] = decodeURIComponent(e.split('=')[1]), r), {});