-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap animations not working #1392
Comments
Hi Gordillo99, You can't use jQuery's bootstrap features in a React project just like that because it tries to modify the DOM and React already does that. If you want to use bootstrap in a React project you have to use project that mix them to work nicely. Maybe this?: https://github.com/reactstrap/reactstrap#adding-bootstrap |
Hi @gordillo99! Like @raerpo said, it is advised against using bootstrap directly as it modifies the DOM -- React should control these things. If you would like to use native bootstrap, however, you need to install jQuery yourself. Let us know if you have any more questions! |
@Timer react-bootstrap only supports Bootstrap 3 which is No Longer Supported while reactstrap uses Bootstrap 4 The current issue with using Bootstrap in a React app built with CRA is that you are not able to customize Bootstrap by changing the SASS variables because CRA does not process SASS files. |
@olivia101 As bootstrap 4 is not yet stable, we cannot recommend it to our users with confidence. Additionally, you can support SASS customization without ejecting from CRA by adding a buildstep and adjusting start/build by appending |
@Timer is adding support for SASS processing without ejecting documented because I couldn't find it in the CRA docs? |
Hey guys I am having problems with Bootstrap. So I have imported the bootstrap css files
import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css';
Bootstrap seems to be working fine, but the dropdown animation is not working. So, I assumed that it was because I was because it was missing the bootstrap.js file. So, I imported it
import 'bootstrap/dist/js/bootstrap.js'
However, when I do that, I get the following error:
Uncaught Error: Bootstrap's JavaScript requires jQuery
I have installed jQuery using npm, but I still see the error. How do I fix it?
PS: I'm really new to web development. Thanks for your help!
The text was updated successfully, but these errors were encountered: