JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<canvas id="myCanvas" width="400" height="200"></canvas>
</body>
JavaScript
var c = document.getElementById('myCanvas');
var ctx = c.getContext('2d');
ctx.fillStyle = '#f00';
ctx.fillRect(30,30, 50,50);