-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.0] Ability to display errors in console instead of redbox #462
Comments
Same here. Thanks for the workaround @icek , it works for me for now. I think if redbox would show the error AND log it in the console at the same time, would be okay. Could be switched on/off with a prop. |
I'm thinking we can add an |
Can't we make it so that Redbox doesn't stop the error from logging into the console with proper sourcemaps? Edit: suggested originally by @jtomaszewski |
I updated PR #494 so that the default behaviour will be However, if you like There's still an issue opened for tracking errors #164, so I believe we can continue thinking about better approach. Nice solution would be to have 'redbox' only on a component that fails, and it can be achieved on Would that work for most of you guys? |
@icek Thanks for the quick fix! |
@icek The workaround saved my day. The red box is a poor developer experience compared to full call stack information in the console. |
Workaround saved my sanity. I don't know why we're forced to use something like RedBox that provides little benefit. |
Errors displayed in Redbox are useless for me especially when it comes to line numbers.
When sourcemaps are used, Chrome console can show exact error location (eg:
SomeComponent.js:12:13
) and you can jump directly into that file and chrome will highlight line causing error. Redbox on the other hand show line number in a bundled file (eg:bundle.js:33052:13
) if you are patient you can search for this line...Example of how useless it is:
I digged a little and found that there is a property
errorReporter
onAppContainer
so I tried to implement custom component for redirecting errors back to console, but I don't know how to make it work. Here is my initial approach:used like this:
and now I get:
React 15.4.2, react-hot-loader 3.0.0-beta.6
The text was updated successfully, but these errors were encountered: