super got strikethrough in React

后端 未结 4 711
挽巷
挽巷 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:36

    It appears on my code as well. I used VSCode version 1.49.0 and when I hover to that strikethrough, in essence it said that:

    The React constructor is marked as deprecated

    and shows me this link: https://reactjs.org/docs/legacy-context.html

    But I'm not sure that has something to do with legacy context. So I searched and found this fresh GitHub Issues discussion, they said it might an issue with the react typings.

    Let's wait for an update from them.

提交回复
热议问题