react-basic-error-boundary
v1.1.0
Published
Basic error boundary component
Maintainers
Readme
react-basic-error-boundary
Basic error boundary component. Based on the React documentation.
Table of Contents
Install
This project uses node and npm.
$ npm install react-basic-error-boundary
$ # OR
$ yarn add react-basic-error-boundaryUsage
import React, {Component} from 'react'
import BasicErrorBoundary from 'react-basic-error-boundary'
class App extends Component () {
render() {
return <BasicErrorBoundary
fallback={() => <NoMatch/>}
onError={(error) => console.error(error)}
>
<h1>Hi</h1>
</BasicErrorBoundary>
}
}
export default AppContribute
- Fork it and create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am "Add some feature" - Push to the branch:
git push origin my-new-feature - Submit a pull request
License
MIT © tiaanduplessis
