这似乎只有在扩展时才会发生React.Component.如果Component从中导入React并扩展它,警告就会消失.
React.Component
Component
React
import React, {Component} from 'react'; class Order extends Component { ... }