0.0.6 • Published 7 years ago

try-catch-component v0.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

CircleCI

try-catch-component

A React component wrapper that catches errors.

Installation

$ npm install try-catch-component

Usage

ES2015

import {PureComponent} from 'react';
import tryCatchComponent from 'try-catch-component';


class MyComponent extends PureComponent {
    render() {
        throw new Error('Oh no!')
    }
    
    renderFallback(e) {
        return (
            <span>Something went wrong</span>  
        );
    }
}


export default tryCatchComponent(MyComponent);

API

TODO...

License

MIT

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago