{"_id":"react-transform-catch-errors","_rev":"287163","name":"react-transform-catch-errors","description":"React Transform that catches errors inside React components","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2021-06-03T18:39:39.000Z","created":"2015-09-03T00:48:36.953Z","1.0.2":"2016-02-02T17:22:51.112Z","1.0.1":"2015-12-25T16:04:29.210Z","1.0.0":"2015-09-19T16:55:52.017Z","0.2.0":"2015-09-17T18:39:32.572Z","0.1.3":"2015-09-15T16:38:42.053Z","0.1.2":"2015-09-12T13:11:16.926Z","0.1.1":"2015-09-03T01:29:29.355Z","0.1.0":"2015-09-03T00:48:36.953Z"},"users":{"nelix":true,"hal9zillion":true},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"versions":{"1.0.2":{"name":"react-transform-catch-errors","version":"1.0.2","description":"React Transform that catches errors inside React components","main":"lib/index.js","files":["lib","src"],"repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel-cli":"^6.3.17","babel-core":"^6.3.21","babel-preset-es2015":"^6.3.3","babel-preset-stage-0":"^6.3.13","rimraf":"^2.4.3"},"gitHead":"ffa576dd1d38399613aa7d8293d9bc0bdfd43594","_id":"react-transform-catch-errors@1.0.2","_shasum":"1b4d4a76e97271896fc16fe3086c793ec88a9eeb","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.1.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"1b4d4a76e97271896fc16fe3086c793ec88a9eeb","size":3605,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-1.0.2.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/react-transform-catch-errors-1.0.2.tgz_1454433770011_0.6742109549231827"},"directories":{},"publish_time":1454433771112,"_cnpm_publish_time":1454433771112,"_hasShrinkwrap":false},"1.0.1":{"name":"react-transform-catch-errors","version":"1.0.1","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"ca5db2ad5ffc626cf653a7caad5255ab6a9b55f9","_id":"react-transform-catch-errors@1.0.1","_shasum":"d46d5c4bc5e56a9e9a78234476c1d8f4c303fe83","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"d46d5c4bc5e56a9e9a78234476c1d8f4c303fe83","size":3503,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-1.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1451059469210,"_cnpm_publish_time":1451059469210,"_hasShrinkwrap":false},"1.0.0":{"name":"react-transform-catch-errors","version":"1.0.0","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"2ee19e0db9c1cbe565a3ef594580dcd4d9fd6919","_id":"react-transform-catch-errors@1.0.0","_shasum":"64a2357c276f510a80926b32aa813c9ba4ac7cba","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"64a2357c276f510a80926b32aa813c9ba4ac7cba","size":3325,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1442681752017,"_cnpm_publish_time":1442681752017,"_hasShrinkwrap":false},"0.2.0":{"name":"react-transform-catch-errors","version":"0.2.0","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"e772b2a5dbd9725cebabec47ccc146fd0c885d34","_id":"react-transform-catch-errors@0.2.0","_shasum":"2cfdcabb02c90a1f14d0b46f3d7fa553010e955d","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"2cfdcabb02c90a1f14d0b46f3d7fa553010e955d","size":3494,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-0.2.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1442515172572,"_cnpm_publish_time":1442515172572,"_hasShrinkwrap":false},"0.1.3":{"name":"react-transform-catch-errors","version":"0.1.3","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"40980647564746054501008d5f1470155f77322f","_id":"react-transform-catch-errors@0.1.3","_shasum":"dfac74aa51444ae741a1de8a55b4a98ed59f60f7","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"dfac74aa51444ae741a1de8a55b4a98ed59f60f7","size":3242,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-0.1.3.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1442335122053,"_cnpm_publish_time":1442335122053,"_hasShrinkwrap":false},"0.1.2":{"name":"react-transform-catch-errors","version":"0.1.2","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"ca71621327cbb326e37b0f8f488d1d3e0f959083","_id":"react-transform-catch-errors@0.1.2","_shasum":"463577b68b5b23bd6ec651ce331c9b9091213a84","_from":".","_npmVersion":"3.3.3","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"463577b68b5b23bd6ec651ce331c9b9091213a84","size":3076,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-0.1.2.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1442063476926,"_cnpm_publish_time":1442063476926,"_hasShrinkwrap":false},"0.1.1":{"name":"react-transform-catch-errors","version":"0.1.1","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"609f2f0722b1ffa6f6bfcd3914681de2d3eda5ca","_id":"react-transform-catch-errors@0.1.1","_shasum":"179c1fb93a7733416ba65f3a572a9e9fa00f8f2f","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"179c1fb93a7733416ba65f3a572a9e9fa00f8f2f","size":2968,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-0.1.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"publish_time":1441243769355,"_cnpm_publish_time":1441243769355,"_hasShrinkwrap":false},"0.1.0":{"name":"react-transform-catch-errors","version":"0.1.0","description":"React Transform that catches errors inside React components","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/gaearon/react-transform-catch-errors.git"},"author":{"name":"Dan Abramov","email":"dan.abramov@me.com"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","scripts":{"clean":"rimraf lib","build":"babel src --out-dir lib","prepublish":"npm run clean && npm run build"},"keywords":["react-transform","react","reactjs","errors","rhl","dx"],"devDependencies":{"babel":"^5.8.23","rimraf":"^2.4.3"},"gitHead":"adce2f3a7af90e3a17d6aca098e3df837755ad56","_id":"react-transform-catch-errors@0.1.0","_shasum":"92b9e357f75650f9b4e810e84b6cde6db6f49f44","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"92b9e357f75650f9b4e810e84b6cde6db6f49f44","size":2424,"noattachment":false,"key":"/react-transform-catch-errors/-/react-transform-catch-errors-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-transform-catch-errors/download/react-transform-catch-errors-0.1.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"deprecated":"Broken NPM release, use 0.1.1 instead","directories":{},"publish_time":1441241316953,"_cnpm_publish_time":1441241316953,"_hasShrinkwrap":false}},"readme":"# react-transform-catch-errors\n\n[![react-transform channel on discord](https://img.shields.io/badge/discord-react--transform%40reactiflux-61DAFB.svg?style=flat-square)](http://www.reactiflux.com)\n\nA [React Transform](https://github.com/gaearon/babel-plugin-react-transform) that catches errors inside `render()` function and renders a React component with an error message instead.\n\nIt’s up to you to choose the React component to render an error message. For example, you may use [redbox-react](https://github.com/KeywordBrain/redbox-react) that imitates React Native “red screen of death”.\n\n## Installation\n\nFirst, install the [Babel plugin](https://github.com/gaearon/babel-plugin-react-transform):\n\n```\nnpm install --save-dev babel-plugin-react-transform\n```\n\nThen, install the transform:\n\n```\nnpm install --save-dev react-transform-catch-errors\n```\n\nFinally, install the component for rendering errors, for example:\n\n```js\nnpm install --save-dev redbox-react\n```\n\nYou may also use a custom component instead.\n\nNow edit your `.babelrc` to include `extra.babel-plugin-react-transform`.  \nIt must be an array of the transforms you want to use:\n\n```js\n{\n  \"presets\": [\"es2015\", \"stage-0\"],\n  \"env\": {\n    // only enable it when process.env.NODE_ENV is 'development' or undefined\n    \"development\": {\n      \"plugins\": [[\"react-transform\", {\n        \"transforms\": [{\n          \"transform\": \"react-transform-catch-errors\",\n          // now go the imports!\n          \"imports\": [\n\n            // the first import is your React distribution\n            // (if you use React Native, pass \"react-native\" instead)\n\n            \"react\",\n\n            // the second import is the React component to render error\n            // (it can be a local path too, like \"./src/ErrorReporter\")\n\n            \"redbox-react\"\n\n            // the third import is OPTIONAL!\n            // when specified, its export is used as options to the reporter.\n            // see specific reporter's docs for the options it needs.\n\n            // it will be imported from different files so it either has to be a Node module\n            // or a file that you configure with Webpack/Browserify/SystemJS to resolve correctly.\n            // for example, see https://github.com/gaearon/babel-plugin-react-transform/pull/28#issuecomment-144536185\n\n            // , \"my-reporter-options\"\n          ]\n        }]\n        // note: you can put more transforms into array\n        // this is just one of them!\n      }]]\n    }\n  }\n}\n```\n\n**It is up to you to ensure that the transform is not enabled when you compile the app in production mode.** The easiest way to do this is to put React Transform configuration inside `env.development` in `.babelrc` and ensure you’re calling `babel` with `NODE_ENV=development`. See [babelrc documentation](https://babeljs.io/docs/usage/babelrc/#env-option) for more details about using `env` option.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/gaearon/react-transform-catch-errors#readme","bugs":{"url":"https://github.com/gaearon/react-transform-catch-errors/issues"},"license":"MIT"}