Once you have already installed the Bootstrap using npm command do the below to include the Bootstrap in your React app
index.js
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
<button type="button" className="btn btn-primary">Primary</button>
The entire App.js will something like this
index.js
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
App.js (to test)
<button type="button" className="btn btn-primary">Primary</button>
The entire App.js will something like this
import React, { Component } from 'react';
class App extends Component {
render() {
return (
<div>
<button type="button" className="btn btn-primary">Primary</button>
</div> );
}
}
export default App;
class App extends Component {
render() {
return (
<div>
<button type="button" className="btn btn-primary">Primary</button>
</div> );
}
}
export default App;
No comments:
Post a Comment