JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Playing with Canvas</h1>
<canvas height="300" width="300" id="board"></canvas>
CSS
h1 {
font-family: Arial;
font-size: 20px;
font-weight: 300;
margin: 20px;
}
canvas {
border: 1px dotted #000;
margin: 20px;
}
JavaScript
var getCanvas = document.getElementById('board');
var getContext = getCanvas.getContext('2d');
getContext.fillRect(50, 25, 150, 100);