I am new to React and trying to add Bootstrap to my project. I followed the below tutorial in creating my first app.
I then tried to add Bootstrap by npm install from the offical site and adding the import line of code to app.tsx file:
var React = require('react');
var ReactDOM = require('react-dom');
import { Button } from 'react-bootstrap';
I also added "react-bootstrap": "^0.32.4" to my package. However when I try to add a button to my app.tsx file, I get errors i.e.
<div> <Button bsStyle="primary">Primary</Button> </div>
Errors: build: JSX expression must have one parent element. TS17004 (TS) Cannot use JSX unless the '--jsx' flag is provided. Build:Left side of comma operator is unused and has no side effects.
I am not sure exactly why this is happening.