プロジェクト
GitHubで見る
carloscuesta/react-native-error-boundary
概要
シンプルなReact Nativeエラーバウンダリコンポーネント 🐛
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- +1
- 15日間
- +2
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルreact-native-error-boundary
A simple and reusable React-Native error boundary component 🐛
Install
yarn add react-native-error-boundary
Documentation
API
ErrorBoundary
These are the props that you can pass to the ErrorBoundary component:
| Property | Type | Required | Default |
|---|---|---|---|
Children |
React.Children |
true |
|
FallbackComponent |
React.Component |
false |
FallbackComponent |
onError |
Function |
false |
Children
Any children that can throw an error.
FallbackComponent
The fallback component that will be rendered after catching an error. By default the library comes with a built-in component.
onError
A function that receives two arguments:
error: The error catched by the component.stackTrace: The stacktrace of the error.
onError(error: Error, stackTrace: string): void
FallbackComponent
These are the props that the FallbackComponent receives:
| Property | Type | Default |
|---|---|---|
| error | Error |
|
| resetError | Function |
error
The error object.
resetError
A function to reset the error state. You'll want to call this function to recover from the error state.
resetError(): void
Demo

関連プロジェクトを探す
読み込み中…