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

Library prints devtools error message to console #99

Open
wearhere opened this issue Jul 25, 2019 · 1 comment
Open

Library prints devtools error message to console #99

wearhere opened this issue Jul 25, 2019 · 1 comment

Comments

@wearhere
Copy link

wearhere commented Jul 25, 2019

If this library is loaded without react-devtools-core or ws being installed, https://github.com/Yomguithereal/react-blessed/blob/1ae620a62c90bd34051d6458876a6b70abd7cf77/src/fiber/devtools.js will throw an error, resulting in this message being logged to the console. I see that I can suppress that by setting NODE_ENV = 'production' prior to loading this library. Is that your recommendation for clients? I don't see anything in the README about that, would be nice to add.

Alternatively, it might be nice to only log this message at all for developers of react-blessed, e.g. compile that warning out, maybe not even try to require('./devtools'), when you build react-blessed for distribution.

If you intend for clients (not just yourselves) to be able to use the devtools, then it would be nice to document that in the README, and IMO make clients have to opt-into using react-devtools / seeing that warning, rather than, at present, have to set NODE_ENV to suppress the warning.

@Yomguithereal
Copy link
Owner

Hello @wearhere. You are making a good point. I guess clients should be able to use devtools but I agree those warnings should not pop out and devtool integration should really be opt-in. However, I don't remember if, at the time, some technical limit was not involved here. @iamdustan do you remember anything about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants