这是完整的错误
警告:React.createElement:type不能为null或未定义。它应该是一个字符串(对于DOM元素)或一个ReactClass(对于复合组件)。
这就是我所拥有的一切
import React, { Component } from 'react';
import Router, {Link, RouteHandler} from 'react-router';
import { Grid, Row, Column, List, ListItem } from '../../components/Layout';
import { RaisedButton, Paper } from 'material-ui';
const videosInformation = {
time : 25,
gameId : 15665,
date : '12 10 2015',
gameName : "Black Jack"
};
export default class Home extends Component {
static contextTypes = {
router : React.PropTypes.func
}
render () {
return <Grid>
<Row>
<Column>
<Paper>
<List subheader="Player Info">
<ListItem primaryText={`Name: ${videosInformation.time}`} />
<ListItem primaryText={`Nickname: ${videosInformation.date}`} />
<ListItem primaryText={`Age: ${videosInformation.gameId}`} />
<ListItem primaryText={`Language: ${videosInformation.gameName}`} />
</List>
</Paper>
</Column>
<Column>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Ta4xuThmAsQ" frameBorder="0" allowFullScreen></iframe>
</Column>
</Row>
</Grid>;
};
}
我正在使用Material-UI
您的Layout
文件可能没有从这一行导出变量之一
import { Grid, Row, Column, List, ListItem } from '../../components/Layout';
如果未定义警告之一,则会发生警告。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句