Buttoon.js
import Button from 'react-bootstrap/Button';
function TypesExample() {
return (
<>
<Button variant="primary">Primary</Button>{' '}
<Button variant="secondary">Secondary</Button>{' '}
<Button variant="success">Success</Button>{' '}
<Button variant="warning">Warning</Button>{' '}
<Button variant="danger">Danger</Button>{' '}
<Button variant="info">Info</Button>{' '}
<Button variant="light">Light</Button>{' '}
<Button variant="dark">Dark</Button>
<Button variant="link">Link</Button>
</>
);
}
export default TypesExample;
App.js
import Buttoon from './Buttoon';
function App() {
return (
<Buttoon/>
);
}
export default App;
in index.js
import 'bootstrap/dist/css/bootstrap.min.css';
in terminal,used npm command
npm install react-bootstrap bootstrap --save
Cannot read properties of null (reading ‘useContext’)
TypeError: Cannot read properties of null (reading ‘useContext’)
have not used hooks concept yet in this project. what is the issue here?