问题
I am trying to render a progress bar and a button using reactstrap@7.1.0. The button is rendered where as the progress bar is not rendered. What am i missing? Also bootstrap version is 4.2.1.
import React from 'react';
import { Progress,Button } from 'reactstrap';
const Home = (props) => {
return (
<div>
<Button color="danger">Danger!</Button>
<div className="text-center">25%</div>
<Progress value="25" />
here i am
</div>
);
};
export default Home;
The following HTML code is rendered
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
</div>
</div>
回答1:
Missed out on importing bootstrap in index file
import 'bootstrap/dist/css/bootstrap.min.css';
来源:https://stackoverflow.com/questions/54618081/reactstrap-progress-not-rendering