本页还没有译文
本页 2 段还没译成한국어,下面显示的是英文原文。useQueryErrorResetBoundary
还没翻译译自英文(tanstack.com)本页 2 段都还没译
This hook will reset any query errors within the closest QueryErrorResetBoundary. If there is no boundary defined it will reset them globally:
import { useQueryErrorResetBoundary } from 'react-query'
import { ErrorBoundary } from 'react-error-boundary'
const App: React.FC = () => {
const { reset } = useQueryErrorResetBoundary()
return (
<ErrorBoundary
onReset={reset}
fallbackRender={({ resetErrorBoundary }) => (
<div>
There was an error!
<Button onClick={() => resetErrorBoundary()}>Try again</Button>
</div>
)}
>
<Page />
</ErrorBoundary>
)
}AI 翻译查看英文原文