The isRedirect function can be used to determine if an object is a redirect object.
The isRedirect function accepts a single argument, an input.
import { isRedirect } from '@tanstack/react-router'
function somewhere(obj: unknown) {
if (isRedirect(obj)) {
// ...
}
}
import { isRedirect } from '@tanstack/react-router'
function somewhere(obj: unknown) {
if (isRedirect(obj)) {
// ...
}
}
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.