isRedirect function
isRedirect 함수는 객체가 리디렉션 객체인지 여부를 확인하는 데 사용됩니다.
isRedirect options
isRedirect 함수는 단일 인수로 input을 받습니다.
input
- 타입:
unknown - 필수 항목
- 리디렉션 객체인지 확인할 객체입니다.
isRedirect returns
- 타입:
boolean - 객체가 리디렉션 객체일 경우
true. - 객체가 리디렉션 객체가 아닐 경우
false.
Examples
import { isRedirect } from "@tanstack/react-router";
function somewhere(obj: unknown) {
if (isRedirect(obj)) {
// ...
}
}