title: How to use Chessboard.js with Reactjs?
body: <p>I've been looking a bit at chessboardjs (<a href="https://chessboardjs.com/" rel="noreferrer">https://chessboardjs.com/</a>) as a way to get some practice with some React coding. However, I haven't been able to get the simple example of just showing the board in my app working. the documentation says to use <code>&lt;div id="board" style={{width: 400}}/&gt;</code> in the HTML, and <code>var board = ChessBoard('board', 'start');</code> to get startet. However, <code>ChessBoard('board', 'start');</code> gives me an "object not a function" compilation error. I've tried fiddling a lot of different things (such as adding the anonymous function with the jquery tag), but I seem to be doing something wrong. I hope someone can spot it.</p>
  
  <p>My React app (using typescript) has the standard App component, which just has a ChessComponent, which looks the following way:</p>
  
  <pre><code>import * as React from 'react';
  import {ChessBoard} from 'chessboardjs';
  import * as $ from 'jquery';
  
  class ChessComponent extends React.Component {
      constructor(props:any) {
          super(props);
      }
  
      componentDidMount() {
          $(function() {
              var board = ChessBoard('board', 'start');
          });
      }
  
      render() {
          return (
              &lt;div id="board" style={{width: 400}}/&gt;
          )
      }
  }
  
  export default ChessComponent
  </code></pre>
  
  <p>and my package.json looks like this:</p>
  
  <pre><code>  {
      "name": "chess-app",
      "version": "0.1.0",
      "private": true,
      "dependencies": {
        "chess": "^0.4.1",
        "chessboardjs": "0.0.1",
        "jquery": "^3.4.0",
        "react": "^16.5.2",
        "react-bootstrap": "^0.32.4",
        "react-dom": "^16.5.2",
        "react-scripts-ts": "3.1.0",
        "tslint": "^5.11.0",
        "tslint-react": "^3.6.0"
      },
      "scripts": {
        "start": "react-scripts-ts start --noUnusedParameters=false",
        "build": "react-scripts-ts build",
        "test": "react-scripts-ts test --env=jsdom",
        "eject": "react-scripts-ts eject"
      },
      "devDependencies": {
        "@types/chessboardjs": "^0.3.1",
        "@types/jest": "^23.3.2",
        "@types/jquery": "^3.3.29",
        "@types/node": "^10.11.3",
        "@types/react": "^16.4.14",
        "@types/react-dom": "^16.0.8",
        "typescript": "^3.1.1"
      }
     }
  </code></pre>