You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several methods are deprecated between React versions. This rule will warn you if you try to use a deprecated method. Use the shared settings to specify the React version.
Rule Details
Examples of incorrect code for this rule:
React.render(<MyComponent/>,root);React.unmountComponentAtNode(root);React.findDOMNode(this.refs.foo);React.renderToString(<MyComponent/>);React.renderToStaticMarkup(<MyComponent/>);React.createClass({/* Class object */});constpropTypes={foo: PropTypes.bar,};//Any factories under React.DOMReact.DOM.div();importReact,{PropTypes}from'react';// old lifecycles (since React 16.9)componentWillMount(){}componentWillReceiveProps(){}componentWillUpdate(){}
Examples of correct code for this rule:
ReactDOM.render(<MyComponent/>,root);// When [1, {"react": "0.13.0"}]ReactDOM.findDOMNode(this.refs.foo);import{PropTypes}from'prop-types';UNSAFE_componentWillMount(){}UNSAFE_componentWillReceiveProps(){}UNSAFE_componentWillUpdate(){}
The text was updated successfully, but these errors were encountered:
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
Several methods are deprecated between React versions. This rule will warn you if you try to use a deprecated method. Use the shared settings to specify the React version.
Rule Details
Examples of incorrect code for this rule:
Examples of correct code for this rule:
The text was updated successfully, but these errors were encountered: