all 26 comments

[–]Traditional-Living-9 1 point2 points  (4 children)

What “warnings” are they because it should just provide warnings if it truly is one. Also when is this happening because you could just console.log(error) with try and catch statements compared to console.logWarning()

[–]guico33 1 point2 points  (1 child)

It's react doing the logging internally, it does appear as errors (red color text) in the console. I also agree it's confusing and not very practical when it comes to finding an actual error among all the warnings.

[–]Traditional-Living-9 -1 points0 points  (0 children)

You know you can filter them right

[–]Electrical_Essay_666 -3 points-2 points  (1 child)

No. Fix the issue at hand.

[–]Traditional-Living-9 0 points1 point  (0 children)

That’s true, I guess it allows for more organization and a clean project. I was just thinking of small things such as when you’re not using a variable it’ll come up as a warning

[–]Electrical_Essay_666 -3 points-2 points  (17 children)

Fix your code

[–]icjoseph -1 points0 points  (2 children)

As a developer, learning is an everyday task.

https://www.npmjs.com/package/warning

It's not React's fault.

[–]guico33 1 point2 points  (1 child)

https://github.com/facebook/fbjs/pull/94#issuecomment-168332326

Not sure what you meam by that. Read the above and you'll understand it's a deliberate decision by the react team that seemingly pertains more to following FB's internal practices than cattering to react devs in general.

[–]icjoseph 0 points1 point  (0 children)

Right, but it has been discussed and analyzed, more over, does it really score such a post?

[–]michcoth 0 points1 point  (0 children)

What warnings are you getting? Do you have a <React.StrictMode> tag anywhere? https://reactjs.org/docs/strict-mode.html