v5 버전 (과거)
interface RouterState { name: string; } const location = useLocation<RouterState>();
type: unknown 오류 발생..
v6 기준
interface RouterState { name: string } const { state } = useLocation() as RouteState;