I have an application written in webpack, typescript and react. I added bootstrap to it like
yarn add bootstrap @types/bootstrap jquery popper
then I wrote a component like
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import * as Bootstrap from 'bootstrap'
class Main extends React.Component {
render() {
return (
<div className="container">
<h1 className="page-header">Hello</h1>
<p className="text-right">Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
<p className="lead">Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
</div>
)
}
}
ReactDOM.render(
<Main />,
document.getElementById("root")
)
but it doesn't seem to be taking any styling from bootstrap.
I googled and there are many many bootstrap tutorials out there. but I can't find a one which shows me how to use bootstrap in a typescript application which uses @types/bootstrap
@types/bootstrappackage only contains type definition files for any JavaScript components included with the Bootstrap framework. It shouldn't contain the actual styles or JavaScript components that ship with Bootstrap. To import those, you would additionally need to install thebootstrappackage.