-1

I have npminstalled bootstrap-sass "^3.3.7", and reactjs. Is this enough to work with the BS classes like 'well' for example?

This is part of my component:

render() {
    return (
        <div className="well">
            hi from well

            <button className="btn btn-danger"></button>
        </div>
    );
}

How can I include the bootstrapstyles in my sass build?

bier hier
  • 20,970
  • 42
  • 97
  • 166
  • have you tried react-bootstrap? https://react-bootstrap.github.io/getting-started.html. Otherwise, I think your current code will work if you have bootstrap-sass included in your npm file. If all else fails, you can also use the bootstrap cdn link, and your code should work. – heyitsjhu Nov 16 '16 at 05:43
  • How can I include reactbootstrap into the sass? – bier hier Nov 16 '16 at 06:03

1 Answers1

0

There are 2 ways in which you can go about doing this:-

  • Use React Bootstrap. But it clearly says that this project is under development so using this in production I think is clearly not a great idea.
  • Add bootstrap to your project and import the bootstrap js file in your html before your compiled bundle.js coming from react.
Harkirat Saluja
  • 7,768
  • 5
  • 47
  • 73