I was trying to use Alert in a project and the whole page kept crashing whenever it tries to render Alert. So I tried creating a new clean project using create-react-app and used the same example code given in the documentation in my index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import {Alert} from 'react-bootstrap';
import registerServiceWorker from './registerServiceWorker';
const alertInstance = (
<Alert bsStyle="warning">
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</Alert>
);
ReactDOM.render(alertInstance, document.getElementById('root'));
registerServiceWorker();
running that only rendered the element inside the Alert like this:
You need to include the Bootstrap CSS.
Aah I presumed it was included in the react-bootsrap package
Most helpful comment
You need to include the Bootstrap CSS.