Skip to content

Commit

Permalink
docs(faq): Explain the difference between CatchBoundary & `ErrorBou…
Browse files Browse the repository at this point in the history
…ndary` (remix-run#2757)

* docs(faq): Explain the difference between CatchBoundary and ErrorBoundary

* Update docs/pages/faq.md

Co-authored-by: Michaël De Boey <[email protected]>
  • Loading branch information
machour and MichaelDeBoey authored Apr 12, 2022
1 parent d30d8a5 commit acb16ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/pages/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,9 @@ Again, `formData.getAll()` is often all you need, we encourage you to give it a

[form-data]: https://developer.mozilla.org/en-US/docs/Web/API/FormData
[query-string]: https://www.npmjs.com/package/query-string

## What's the difference between `CatchBoundary` & `ErrorBoundary`?

Error boundaries render when your application throws an error and you had no clue it was going to happen. Most apps just go blank or have spinners spin forever. In remix the error boundary renders and you have granular control over it.

Catch boundaries render when you decide in a loader that you can't proceed down the happy path to render the UI you want (auth required, record not found, etc.), so you throw a response and let some catch boundary up the tree handle it.

0 comments on commit acb16ca

Please sign in to comment.