6

My vscode is warning on super(props), Anyone has ideas why?

enter image description here

class TableSizeInput extends React.Component {
  constructor(props) {
    super(props);
      this.state = {
      default_columns: this.props.default_columns,
      default_rows: this.props.default_rows
    };
  };

Thanks in advance!

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
Yang
  • 152
  • 1
  • 9
  • 1
    Does this answer your question? [What does "This method is deprecated" mean for application developers](https://stackoverflow.com/questions/8449210/what-does-this-method-is-deprecated-mean-for-application-developers) Yes, I know it's for java, but the principle of deprecation is the same ... – derpirscher Sep 11 '20 at 22:02
  • 2
    Are you using the feature that's been deprecated, found at the link it provides? https://reactjs.org/docs/legacy-context.html – zcoop98 Sep 11 '20 at 22:05
  • @zcoop98 yes I think I used a legacy context, thank you – Yang Sep 11 '20 at 22:12
  • For what it's worth, VS Code *just* added highlighting of deprecated API usages. More detail here: [VS Code Update August 2020 (version 1.49), Deprecated tag support for JavaScript and TypeScript](https://code.visualstudio.com/updates/v1_49#_deprecated-tag-support-for-javascript-and-typescript). – zcoop98 Sep 11 '20 at 22:19
  • Had a same issue and found this [answer](https://stackoverflow.com/a/63857001/13160606) – CSSer Sep 12 '20 at 07:25

0 Answers0