Home > Back-end >  Cant connect react-bootstrap to react app
Cant connect react-bootstrap to react app

Time:04-11

I have installed react-bootstrap via:

npm install react-bootstrap bootstrap

my code is:

import Button from "react-bootstrap/Button";

function App() {
  return (
    <div>
      <h1>Counter</h1>

      <Button variant="success">Add</Button>
      <Button variant="Danger">Substract</Button>
    </div>
  );
}

export default App;

and buttons don't change:

enter image description here

CodePudding user response:

Try to insert this line

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

in this file or in your index.js file.

  • Related