0
import React from 'react';
import {Alert} from 'react-bootstrap';
var App = React.createClass({
render() {
return React.createElement('Alert',{bsStyle: 'danger'},'this alert doesn\'t work');
}
});
module.exports = App;
我呈現在另一個組件的DOM這個組件。它的正常工作與這樣的非自舉元素,例如:
import React from 'react';
import {Alert} from 'react-bootstrap';
const element = React.createElement(
'h1',
{className: 'greeting'},
'Hello, world!'
);
var App = React.createClass({
render() {
return element;
}
});
module.exports = App;