'react bootstrap button suddenly not working?

I'm trying to learn reactjs with bootstrap 5 so I'm trying this code but it gives an empty screen when I run npm start. this started happening after I deployed the app using github pages. yesterday it was still normal. I'm using windows 10.

this is my code

App.js

import { Button } from "bootstrap";

const App = () => {
  return (
    <>
      <h1>Hello World</h1>
      <Button variant="primary">button</Button>
    </>
  );
};

export default App;

I've already added the bootstrap css file in the index.html and I already have bootstrap 5.1.3 and react-bootstrap 2.2.1 in the package.json..

any help is greatly appreciated



Solution 1:[1]

import { Button } from 'react-bootstrap';
import Button from 'react-bootstrap/Button';

Either one of these should work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nicolai Christensen