0

I do not want to rewrite my bootstrap admin templates to work with react-bootstrap library. I just want to use my bootstrap components in react. All the bootstrap css stuff works in react but none of the actions do. For instance a simple data-toggle in bootstrap is not working in react.

I know react has uncontrolled components. PLEASE could someone show me how I can use this to get a simple data-toggle in bootstrap to work in react.

<a href="#" data-toggle="sidebar" aria-label="Hide Sidebar"></a>
<div data-toggle="sidebar">TOGGLE ME</div>
lewenberg
  • 1
  • 1

1 Answers1

0

You can use regular Bootstrap with react by installing bootstrap via npm i bootstrap --save in your project folder.

Don't forget to also import bootstrap in your index.js file. You can do so by: import 'bootstrap/dist/css/bootstrap.min.css';