eugen_sunic eugen_sunic - 4 years ago 210
React JSX Question

Import bootstrap to react Atom?

I have successfully imported Jquery to atom using the following code:

import $ from 'jquery';

What would be the equivalent for importing css-bootstrap?

NOTE:
I have successfully installed bootstrap into my project folder (using the command line):

$ npm install react-bootstrap --save

Answer Source

I would normally just import regular bootstrap using

npm install bootstrap@4.0.0-alpha.6

Then call it in my app like

import 'bootstrap/dist/css/bootstrap.css'

I would also recommend using atom autocomplete-modules package to help finding your desired files in modules

Keep in mind that it will work if you are using create-react-app to help import assets in JavaScript

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download