I'm using the React Starter Kit and want to use an npm module for my css and javascript (namely bootstrap).
How do I integrate it properly? Simply installing it doesn't make it available on the server.
I'm using the React Starter Kit and want to use an npm module for my css and javascript (namely bootstrap).
How do I integrate it properly? Simply installing it doesn't make it available on the server.
To install bootstrap you actually need the npm package called react-bootstrap. So first run
npm install --save react-bootstrap
and then import the components in your app. To have the bootstrap's css and default theme, just include the cdn css files right into your main index.html file as
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">
If you want a starter kit that has all the needed packages in order to build rich real-world apps, but with minimal configuration, you can try http://redux-minimal.js.org/
By default redux-minimal comes with bootstrap, sass and a demo app to show you how code looks like. Alternatively you could just check the github code and borrow code that way and stick to your existing starter kit.