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
}
Mxcpanel
  • 95
  • 7

1 Answers1

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

phry
  • 35,762
  • 5
  • 67
  • 81