Reactjs 升级react virtualized时出现错误:超级表达式必须为null或函数,而不是未定义的

Reactjs 升级react virtualized时出现错误:超级表达式必须为null或函数,而不是未定义的,reactjs,react-virtualized,Reactjs,React Virtualized,我从react virtualized 8.11-->9.1升级,并收到上述错误。单据变更的核算: 1-我使用的是React版本0.15.X 2-我没有使用CellMeasurer组件 你们中有没有人经历过一次突破性的变化升级,以在上述范围之外对虚拟化9作出反应?升级时我没有做任何其他更改 VirtualizedTable.js import React,{Component,PropTypes}来自'React'; 从“react virtualized”导入{AutoSizer,Table

我从react virtualized 8.11-->9.1升级,并收到上述错误。单据变更的核算:

1-我使用的是React版本0.15.X

2-我没有使用CellMeasurer组件

你们中有没有人经历过一次突破性的变化升级,以在上述范围之外对虚拟化9作出反应?升级时我没有做任何其他更改

VirtualizedTable.js

import React,{Component,PropTypes}来自'React';
从“react virtualized”导入{AutoSizer,Table,Column,defaultTableRowRenderer};
从“类名称”导入类名称;
从'react bootstrap'导入{Input};
导入“react virtualized/styles.css”;
//导入“../sass/components/virtualized table.scss”;
导出默认类VirtualizedTable扩展组件{
静态类型={
架构:PropTypes.shape({
instanceType:PropTypes.string,
可搜索:PropTypes.bool,
骨架:PropTypes.arrayOf(PropTypes.shape({
键:PropTypes.string,
标签:PropTypes.string,
显示:PropTypes.string,
可排序:PropTypes.bool
}))
}).要求,
数据:需要PropTypes.arrayOf(PropTypes.object),
onRowClick:PropTypes.func,
rowClassName:PropTypes.oneOfType([PropTypes.string,PropTypes.func]),
rowRenderFn:PropTypes.func,
statusRenderFn:PropTypes.func,
actionsRenderFn:PropTypes.func,
排序:PropTypes.string,
sortDirection:PropTypes.oneOf(['ASC','DESC']),
maxHeight:PropTypes.number
};
建造师(道具){
超级(道具);
此.state={
sortBy:“name”,
sortDirection:'ASC',
表筛选器:“”
};
this.sort=this.sort.bind(this);
this.onFilterChange=this.onFilterChange.bind(this);
}
componentDidMount(){
如果(这个。道具。肮脏){
这是我的国家({
sortBy:这个。道具。sortBy
});
}
如果(此.道具.排序方向){
这是我的国家({
sortDirection:这个.props.sortDirection
});
}
}
排序({sortBy,sortDirection}){
if(this.state.sortBy!==sortBy){
this.setState({sortBy});
}否则{
this.setState({sortBy,sortDirection});
}
}
onFilterChange(e){
this.setState({tableFilter:e.target.value});
}
escapeRegex(str){
返回str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\;
}
render(){
const{showFilter}=this.props;
让sortedList=this.props.data;
if(this.state.tableFilter){
让regex=newregexp(this.escapeRegex(this.state.tableFilter),'i');
sortedList=this.props.data.filter(
项目=>{
设布尔=假;
用于(让输入项){
bool=(正则表达式测试(项[键]);
如果(bool)中断;
}
if(bool)退货项目;
}
);
}
if(this.state.sortBy){
sortedList=sortedList.sort(
(a,b)=>a[this.state.sortBy]的类型==='string'?
a[this.state.sortBy]item.display!=='hidden');
const rowHeight=this.props.rowHeight | | 40;
const headerHeight=this.props.headerHeight | | 40;
返回(
{
(showFilter)?
:
无效的
}
{({width:autoWidth})=>{
//使用静态宽度(如果提供)-注:用于测试目的
const width=this.props.width | | autoWidth;
返回(
this.props.maxHeight?this.props.maxHeight:(sortedList.length+1)*行高}
headerHeight={headerHeight}
rowHeight={rowHeight}
rowClassName={this.props.rowClassName}
rowRenderer={this.props.rowRenderFn | | defaultTableRowRenderer}
rowCount={sortedList.length}
rowGetter={({index})=>sortedList[index]}
sort={this.sort}
sortBy={this.state.sortBy}
sortDirection={this.state.sortDirection}
onRowClick={({index})=>this.props.onRowClick(this.props.data[index]))
>
{
columns.map((column,i)=>{
返回(
);
})
}
);
}}
);
}
}
呼叫2个中断更改:
CellMeasurer
和所需/支持的React版本:

支持的React版本已更改。以前支持所有React 14和15版本。仅支持React 15.3及更新版本。这样做是为了删除
react加载项上的对等依赖项,并按照文档建议将其替换为
react.PureComponent


您似乎没有使用所需的React版本。(安装时,NPM/Thread应警告您存在无效的对等依赖关系。)

没有React
0.15.X