K
Size: a a a
K
АЗ
K
АЗ
K
as
new URLSearchParams("?page=1&sort=popularity").get("page")
// 1И
🧨
K
🧨
АЗ
K
new URLSearchParams("?page=1&sort=popularity").get("page")
// 1as
new URLSearchParams("?page=1&sort=popularity").get("page")
// 1as
import { useLocation } from 'react-router';
export const useSearchParams = () => {
return new URLSearchParams(useLocation().search);
};
export const useSearchParam = (param: string) => {
return useSearchParams().get(param);
};
АЗ
P
K
K
import { useLocation } from 'react-router';
export const useSearchParams = () => {
return new URLSearchParams(useLocation().search);
};
export const useSearchParam = (param: string) => {
return useSearchParams().get(param);
};
И
АЗ