Skip to content
Discussion options

You must be logged in to vote

not sure what this has to do with react-query? Wouldn't you get the same result if you did:

try {
  const data = await api()
} catch {
  redirect("/")
}

idk, maybe redirect is just not something you can do within a server component? But that's really a next specific question

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@TkDodo
Comment options

@wslp12
Comment options

@TkDodo
Comment options

@wslp12
Comment options

Answer selected by wslp12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants