Reputation: 9194
I have an existing project and am really starting to jump into the frontend. Just have placeholders basically currently to make sure the backend and frontend were talking.
I want to use reactstrap
, but the directions aren't entirely clear to me so was looking for clarification. I have been skipping over the create-react-app
section as I am not using that.
I am just at the Adding Bootstrap section. It says:
npm install --save [email protected]
Right off this says:
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
I was under the impression jquery
and react
were mutually exclusive, so do I really need to do this?
npm install --save reactstrap@next react@^16.0.0 react-dom@^16.0.0
This installs fine.
Then it says:
Import Bootstrap CSS in the src/index.js file:
import 'bootstrap/dist/css/bootstrap.css';
I guess suggesting to just download the CSS file and read it into the entry point. Is reactstrap
dependent on this configuration to work properly?
Can't I just read in Bootstrap v4 via CDN into the index.html
of the SPA? Would reactstrap
still work properly?
Is one more preferable than the other?
Upvotes: 1
Views: 420
Reputation: 1061
You can ignore jQuery warning since reactstrap uses only css part of bootstrap.
Yes. CDN would work provided that you included link for bootstrap 4.0.
Upvotes: 1