let's add non-error version of 'warning'
Hi!
We would like a version of 'warning' which uses 'console.warn' instead of 'console.error'. This is for deprecations notices, which tend to be noisy and lower pri than other warnings.
Since we don't always do releases and updates of this repo, I'm going to go ahead and fork 'warning' and make the alternative version in the React repo for the sake of speed. Eventually we should probably move that module here too though.
I don't really care about the name - for now thinking of 'deprecationWarning' but open to changes.
Progress on this can be tracked in #9395 and in #9398.
Thanks!
Check out https://github.com/facebook/react/blob/master/src/shared/utils/deprecated.js which you could probably coopt and stop calling into warning.
We could have the broader discussion about perhaps adding a level flag to warning or something, we'll just want to figure that out internally too (would need a codemod). I think that's probably fine but easy to abuse.
We've had several discussions about making warning use console.warn all the time which we shut down (I usually point back to #94), so + @spicyj who's been involved there.
We could also revive the effort to bring the redbox to the web, though that's even more intrusive so might bring out other issues.
lol I only got Paul's comment in my email and thought, "ooh I should cc @flarnie; she'll care about this" only to find this issue.
Fine with any of these.
@flarnie Let's just inline console.warn() for now?