0

Are there some examples of use with ErrorBoundary?

This is what i can think of:

const { isError: isGetAError, error: getAError } = useGetAQuery()
if (isGetAError) {
  throw getAError
}
const { isError: isGetBError, error: getBError } = useGetBQuery()
if (isGetBError) {
  throw getBError
}

1 Answer 1

0

That would probably be the way to do it, or you create your own throwingHooks module with your own way of writing hooks - these are pluggable modules.

Here is the code to the /query/react module: https://github.com/reduxjs/redux-toolkit/tree/master/packages/toolkit/src/query/react

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.