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
CodePudding user response:
import { Button } from 'react-bootstrap';
import Button from 'react-bootstrap/Button';
Either one of these should work.