All Projects â†’ kossnocorp â†’ React Guard

kossnocorp / React Guard

Licence: other
🦄 React Guard automagically catches exceptions from React components, extracts useful debug information and prevents White Screen of Death 👻

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Guard

Collision
💥 Collision is a beautiful error reporting tool for command-line applications
Stars: ✭ 3,993 (+4386.52%)
Mutual labels:  exceptions
Restfulsense
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
Stars: ✭ 28 (-68.54%)
Mutual labels:  exceptions
Noexception
Java library for handling exceptions in concise, unified, and architecturally clean way.
Stars: ✭ 56 (-37.08%)
Mutual labels:  exceptions
Bugsnag Php
Bugsnag error monitoring and crash reporting tool for PHP apps
Stars: ✭ 475 (+433.71%)
Mutual labels:  exceptions
Sosl
StackOverflow Search Library
Stars: ✭ 10 (-88.76%)
Mutual labels:  exceptions
Friendly Exception
An interface for an exception to be friendly
Stars: ✭ 41 (-53.93%)
Mutual labels:  exceptions
Exceptionless.net
Exceptionless clients for the .NET platform
Stars: ✭ 362 (+306.74%)
Mutual labels:  exceptions
Backtrace
Makes Python tracebacks human friendly
Stars: ✭ 80 (-10.11%)
Mutual labels:  exceptions
Backtrace
Ruby gem to print exception backtrace nicely
Stars: ✭ 14 (-84.27%)
Mutual labels:  exceptions
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-46.07%)
Mutual labels:  exceptions
Traceback with variables
Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works in Jupyter and IPython. Install with pip or conda.
Stars: ✭ 509 (+471.91%)
Mutual labels:  exceptions
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+738.2%)
Mutual labels:  exceptions
Rollbar Android
Rollbar for Android
Stars: ✭ 41 (-53.93%)
Mutual labels:  exceptions
Rollbar Gem
Exception tracking and logging from Ruby to Rollbar
Stars: ✭ 414 (+365.17%)
Mutual labels:  exceptions
Bugsnag Python
Official bugsnag error monitoring and error reporting for django, flask, tornado and other python apps.
Stars: ✭ 69 (-22.47%)
Mutual labels:  exceptions
Bugsnag React Native
Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
Stars: ✭ 374 (+320.22%)
Mutual labels:  exceptions
Bugsnag Android
Bugsnag crash monitoring and reporting tool for Android apps
Stars: ✭ 990 (+1012.36%)
Mutual labels:  exceptions
Larabug
Laravel error reporting tool
Stars: ✭ 84 (-5.62%)
Mutual labels:  exceptions
Vos backend
vangav open source - backend; a backend generator (generates more than 90% of the code needed for big scale backend services)
Stars: ✭ 71 (-20.22%)
Mutual labels:  exceptions
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (-52.81%)
Mutual labels:  exceptions

React Guard

React Guard helps to prevent White Screen of Death, improves user expirience and assists in the bug hunt.

It patches React, so it wraps every render function (including function components) intro try-catch block.

If an exception occurs during the rendering, it calls specified guard function. The guard function gets the exception object and extra information such as the component props, state and displayName.

Installation

npm install react-guard --save

or

yarn add react-guard

Usage

var React = require('react')
var reactGuard = require('react-guard')

// Catch and process component render exceptions.
reactGuard(React, function (err, componentInfo) {
  // Print stacktrace to the console
  console && console.error && console.error(err.stack)

  // Notify Sentry (replace with your service of choice)
  Raven.captureException(err, {
    extra: {
      props: componentInfo.props,
      state: componentInfo.state,
      displayName: componentInfo.displayName
    }
  })

  // Replace failed component with "Failed to render".
  // Use `return null` to render nothing.
  return <div>Failed to render</div>
})

License

MIT © Sasha Koss

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].