Gatsby: [Question] How can I use GatsbyJS with reactstrap?

Created on 3 May 2018  路  2Comments  路  Source: gatsbyjs/gatsby

Hello everyone,
I'm starting with Gatsby and React :)
I'm tryong to add Reactstrap in my starter template.
So I have,

npm install --save reactstrap react react-dom
import { Button } from 'reactstrap';

class Header extends Component {
  render() {
    return (
    <Button color="danger">Danger!</Button>      
    );
  }
}

export default Header

However, the style isn't showing.. can you help me?
ps: sorry for bad english

Most helpful comment

Make sure you've installed bootstrap:
npm install bootstrap --save

Then in your index.js:
import 'bootstrap/dist/css/bootstrap.min.css';

All 2 comments

You need to add the Bootstrap styles manually. Search for "Adding Bootstrap" on the reactstrap website for their instructions. Good luck!

Make sure you've installed bootstrap:
npm install bootstrap --save

Then in your index.js:
import 'bootstrap/dist/css/bootstrap.min.css';

Was this page helpful?
0 / 5 - 0 ratings