I am trying to render my React component using traditional bootstrap instead of react-bootstrap. I'm not sure what I'm doing wrong here. I've installed bootstrap via npm, used the cdn links as well along with the scripts. I feel like I've tried everything here but my component won't load as I want it to.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
Here's my component code:
import React, {Component} from "react";
export default class Home extends Component {
render() {
var cardStyle = {
width: "20 rem"
};
return(
<div className ="card" style = {cardStyle}>
<img className="card-img-top" src="..." alt=""></img>
<div className="card-block">
<h4 className="card-title">Card title</h4>
<p className="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" className="btn btn-primary">Go somewhere</a>
</div>
</div>
);
}
}
My card component won't show up. Instead I get : as you see not how a typical bootstrap card component would look like
Can anyone tell me what I may be doing wrong here?