From a44665a56774c1f38e304409a8173dd5df589fae Mon Sep 17 00:00:00 2001 From: Lukas Bergstrom Date: Thu, 12 Dec 2024 19:07:45 -0800 Subject: [PATCH] Add instructions on catching errors in useLiveQuery() Add instructions on catching errors in useLiveQuery() using error boundaries --- docs/dexie-react-hooks/useLiveQuery().md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/dexie-react-hooks/useLiveQuery().md b/docs/dexie-react-hooks/useLiveQuery().md index 23f5b2fe..533faf13 100644 --- a/docs/dexie-react-hooks/useLiveQuery().md +++ b/docs/dexie-react-hooks/useLiveQuery().md @@ -228,6 +228,9 @@ function MyComponent(id) { ``` +# Catching errors in useLiveQuery + +Use an [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) to catch and inspect any errors happening in useLiveQuery. # Playgrounds