Skip to content

React-Query v3 to Latest Version Migration: Issues Encountered #6975

Answered by TkDodo
mohamad-msalme asked this question in General
Discussion options

You must be logged in to vote

Previously, in React-Query v3, I could utilize useErrorBoundary to catch errors. However, this functionality is not available in the latest version.

It was just renamed to throwOnError. Please read the migration guides

It appears that useSuspenseQuery is caching the previous failed authentication result

Just as with normal queries, resolved Promises will be cached and rejected Promises will lead to an error. Caching wise, there is no difference between suspense and non-suspense querying

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mohamad-msalme
Comment options

Answer selected by mohamad-msalme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants