Skip to content

Commit 25a52e6

Browse files
authored
πŸ“ Add FAQ section (#166)
1 parent a41aa4a commit 25a52e6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

β€ŽFAQ.mdβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# FAQ
22

3+
## Why do you need error boundaries?
4+
5+
As of **React 16**, errors that were **not caught** by any **error boundary** will **result** in **unmounting** of the **whole** React **component tree** 😱.
6+
7+
[Read more about the dangers](https://carloscuesta.me/blog/managing-react-native-crashes-with-error-boundaries#why-you-should-use-them-) of this.
8+
39
## Why choose `react-native-error-boundary` over [`react-error-boundary`](https://github.com/bvaughn/react-error-boundary)?
410

511
The main difference is that `react-native-error-boundary` targets React Native. It provides a default `FallbackComponent` that uses React Native components underneath, so this is **not compatible with React** on the web. Additionally, the API for `react-error-boundary` is somewhat different, having many more options than `react-native-error-boundary` while also seemingly being compatible with React Native.

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ These are the props that the `FallbackComponent` **receives**:
108108

109109
## FAQ
110110

111+
- [Why do you need error boundaries?](FAQ.md#why-do-you-need-error-boundaries)
112+
111113
- [Why choose `react-native-error-boundary` over `react-error-boundary`?](FAQ.md#why-choose-react-native-error-boundary-over-react-error-boundary)
112114

113115
- [Why I see a red error screen on development?](FAQ.md#why-i-see-a-red-error-screen-on-development)

0 commit comments

Comments
Β (0)