Twitter bootstrap 3 错误:不变冲突:Grid.render()
我试图在我的页面上使用React引导,但我的第一个组件出现错误。我已经用yeoman fluxible generator构建了一个页面,并试图将react引导添加到其中Twitter bootstrap 3 错误:不变冲突:Grid.render(),twitter-bootstrap-3,reactjs,react-bootstrap,Twitter Bootstrap 3,Reactjs,React Bootstrap,我试图在我的页面上使用React引导,但我的第一个组件出现错误。我已经用yeoman fluxible generator构建了一个页面,并试图将react引导添加到其中 import {Grid} from 'react-bootstrap'; import {Row} from 'react-bootstrap'; import {Col} from 'react-bootstrap'; class Application extends React.Component { render(
import {Grid} from 'react-bootstrap';
import {Row} from 'react-bootstrap';
import {Col} from 'react-bootstrap';
class Application extends React.Component {
render() {
var Handler = this.props.currentRoute.get('handler');
return (
<div>
<Grid>
<Row>
<Col xs={12} md={8}>
<Nav selected={this.props.currentPageName} links={this.props.pages} />
</Col>
</Row>
<Row>
<Col>
<Handler />
</Col>
</Row>
</Grid>
</div>
);
}
从'react bootstrap'导入{Grid};
从'react bootstrap'导入{Row};
从'react bootstrap'导入{Col};
类应用程序扩展了React.Component{
render(){
var Handler=this.props.currentRoute.get('Handler');
返回(
);
}
但是当我运行它时,我得到一个错误
错误:不变冲突:Grid.render():必须返回一个有效的ReactComponent。您可能返回了未定义的、数组或其他一些无效的对象。
Fluxible generator使用react 0.13,它与react引导不兼容。升级react到0.14.3后,它可以工作