super got strikethrough in React

后端 未结 4 715
挽巷
挽巷 2021-01-18 23:52

Code

import React, { Component } from \'react\';
import PropTypes from \'prop-types\';
import axios from \'axios\';
import { connect } from \'react-redux\';         


        
4条回答
  •  星月不相逢
    2021-01-19 00:50

    It seems it is related to the new update of VS Code: https://code.visualstudio.com/updates/v1_49#_deprecated-tag-support-for-javascript-and-typescript

    To fix the issue, for now, you can change super(props) to super() and it will fix it. It will not affect your codes if you are not using props in the codes inside constructor(), which means it will not affect your code since you have not used props inside constructor.

提交回复
热议问题