react-basic-error-boundary

1.1.0 • Public • Published

react-basic-error-boundary

package version package downloads standard-readme compliant package license make a pull request JavaScript Style Guide Greenkeeper badge

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-boundary

Usage

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 App

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT © tiaanduplessis

/react-basic-error-boundary/

    Package Sidebar

    Install

    npm i react-basic-error-boundary

    Weekly Downloads

    11

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    9.06 kB

    Total Files

    14

    Last publish

    Collaborators

    • tiaanduplessis