JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="test" width="200" height="200"></canvas>
JavaScript
var canvas = document.getElementById( 'test' );
var context = canvas.getContext( '2d' );
context.mozImageSmoothingEnabled = false;
context.webkitImageSmoothingEnabled = false;
context.imageSmoothingEnabled = false;
context.beginPath();
context.arc(100, 100, 100, 0, Math.PI * 2, true );
context.closePath();
context.fillStyle = 'red';
context.fill( );