Every time on commit or code inspection in my React project in WebStorm i got warnings on React lifecycle methods like that:
Warning:Conflicting inherited declaration React.ComponentLifecycle.componentDidMount was found in namespace internal
I can only disable them on Editor -> Inspections -> JavaScrip -> General -> Duplicate JavaScript declaration. But this is really bad idea.
Is anyone got ideas how i can disable this outrageous warnings?
Update. Code snippet with warning message above:
class Order extends React.Component {
...
componentDidMount() {
...
}
}
This seems to happen only when extending React.Component. If you import Component from React and extend that, the warnings go away.
import React, {Component} from 'react';
class Order extends Component {
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With