1.0.8 • Published 2 years ago
@tomorrow-catcher/react v1.0.8
@tomorrow-catcher/react
the react'SDK of the tomorrow-catcher'SDK
Install
Using npm:
$ npm install --save @tomorrow-catcher/react
or using yarn:
$ yarn add @tomorrow-catcher/react
or using pnpm:
$ pnpm add @tomorrow-catcher/react
Usage
Options
key
Type: string
Default:
the app unique key
expireDate
Type: number
Default: 0
the log expire date,the log will upload when the expireDate was setting 0.one step is millisecond.
reportUrl
Type: string
Default:
the log upload api url.
handlersList
Type: 'error' | 'unhandledrejection' | 'fetch' | 'xhr'[]
Default: []
the errors handler options
errorBoundary Options
errorComponent
Type: React.ReactElement
the errorBoundary component's default error component
onMount
Type: Function
the errorBoundary component's componentDidMount
onUnmount
Type: Function
the errorBoundary component's componentWillUnmount
beforeUpload
Type: Function
the log custom info factory function