Skip to content
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

Add hints for finding components or source files that cause warnings #136

Open
nickserv opened this issue Aug 13, 2017 · 0 comments
Open

Comments

@nickserv
Copy link

nickserv commented Aug 13, 2017

I'm using create-react-app in development with react-a11y's setup in src/index.js. My developer console displays warnings as I expected, but unfortunately there are a lot of them and the stack traces only contain the line of code in react-a11y's source that fires warning, with no information on the components or source files that exhibit these warnings.

image

This seems to be fixed if I set throw to true, though it halts my entire app and displays only one error at a time (at least on React 15) which is inconvenient for development. For now setting this in my test startup script seems to be a more convenient workaround. Still, it would be nice to see multiple error sources in my app and not just its test suite.

Ideas

  1. Produce stack traces in warnings (not just errors).
  2. Display the names of React components containing errors (React does this for prop type validation) and/or the names of the tags. Line numbers would be even better but I'm not sure if this would be possible without generating stack traces or running code in VMs.
  3. Set throw option to true by default. This would probably be the easiest solution to implement, but it's the most tedious to develop with on React 15 which only shows one error at once without boundaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants