Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

delicate-error-reporter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delicate-error-reporter

A polite error reporter which delicately awaits your attention at the corner of the screen

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
Created
Source

delicate-error-reporter

npm version Downloads

This one displays error unobtrusively. It won't jump on you.

out

Usage

Feed component with fresh errors.

Specifically designed to work with react-transform-webpack-hmr and react-transform-catch-errors. See example.

May even work with react-hot-loader, but I haven't tested it. Sidenote: All hail to the new king, react-transform-webpack-hmr!

The right way to get things done:

Install the Babel plugin:

npm install --save-dev babel-plugin-react-transform

Then, install the transform:

npm install --save-dev react-transform-catch-errors

Finally, install this one package for rendering errors:

npm install --save-dev delicate-error-reporter

Now edit your .babelrc to include extra.babel-plugin-react-transform.

{
  "stage": 0,
  "plugins": [
    "react-transform"
  ],
  "extra": {
    "react-transform": [{
      "target": "react-transform-catch-errors",
      "imports": ["react", "delicate-error-reporter"]
    }]
  }
}

And that's it.

Programmatic usage

import DelicateErrorReporter from 'delicate-error-reporter';
const e = new Error('Ergh');

ReactDOM.render(<DelicateErrorReporter error={ e } />, root);

Apologies

I must say that I borrowed a lot of redbox-react's code. I really feel myself ashamed :(

Thanks

Many thanks goes to @gaearon for his awesome work and many thanks goes to @KeywordBrain for inspiration.

License

MIT, see LICENSE for details.

Keywords

FAQs

Package last updated on 13 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc