🦔Next.jsでクエリパラメーターを全て取得する2024/03/07に公開Next.jstech地味に詰まったのでメモ import { useRouter, useSearchParams } from "next/navigation"; const searchParams = useSearchParams(); const params = searchParams?.toString(); const url = params ? `/?${params}` : "/"; const handleClick = () => { router.push(url); }; Discussion
Discussion