JSFiddle - React, Tailwind, and code Playground

by gianlucaguarini

HTML

<canvas width='1' height='1'></canvas>

CSS

body {
  margin: 0;
}

canvas {
  width: 100vw;
  height: 100vh;
}

JavaScript

var c = document.querySelector('canvas').getContext('2d'),
  counter = 0

function draw() {
  counter++
  c.rect(0, 0, 1, 1)
  c.fillStyle = `hsl(${ counter }, 100%, 50%)`
  c.fill()
  requestAnimationFrame(draw)
}

draw()