- インターネット接続のない状況でnet::ERR_INTERNET_DISCONNECTEDが出る(これはわかる)
- オフラインでも使えるようにしたいのでエラーで死なないでほしい
- どうやってエラー処理するんだ??
- firebase.initializeAppもfirebase.firestoreもPromiseではない
- firebase.initializeAppとfirebase.firestoreをtryで囲ってもダメ
- Reactの側でエラー処理すべき
- Error Boundaries – React
-
componentDidCatch and getDerivedStateFromError: There are no Hook equivalents for these methods yet, but they will be added soon.
- Hooks FAQ – React
- FCでできない
- class ErrorBoundaryを作って解決した
- 今はcomponentDidCatchで単にconsole.logしている
- 将来的にはSentryとかにつなぐとよい