score:0

Accepted answer

i needed to import jquery in index.js. also using react-bootstrap without jquery worked. thanks for everyone

score:0

i would take a look at this - https://react-bootstrap.github.io/. i recently built a simple little app and used this to avoid issues using bootstrap with react.

the code looks like this:

import react, {component} from "react";
import "./app.css";
import 'bootstrap/dist/css/bootstrap.min.css';

import mediaquery from "react-responsive";
import spotifywebapi from "spotify-web-api-js";
import { base64 } from 'js-base64';

import jumbotron from 'react-bootstrap/jumbotron'
import {button} from 'react-bootstrap';
import container from 'react-bootstrap/container'
import row from 'react-bootstrap/row'
import col from 'react-bootstrap/col'


<div classname="app">
                <container>
                    <row>
                            <col classname = "autocenter">
                                <jumbotron classname = "backgroundcolor">
                                  <h1>hello, friend!</h1>
                                  <div>
                                    hello
                                  </div>
                                  <div classname = "mt3">
                                   text
                                  </div>
                                  <div>
                                    <button
                                        classname="spotifygreen mt4 f6 dim br-pill"
                                        href = "">
                                            button
                                    </button>
                                  </div>
                                </jumbotron>
                            </col>
                    </row>
                </container>
</div>

i left out a bunch of stuff, but hopefully that helps with the syntax!


Related Query

More Query from same tag