JSFiddle - React, Tailwind, and code Playground

by Nikhil krishnan

HTML

<script src="http://paperjs.org/assets/js/paper.js"></script>
<canvas id="canvas"></canvas>

CSS

*,html{
  margin: 0;
  padding: 0;
}

JavaScript

var canvas = document.getElementById('canvas');
var ctx    = canvas.getContext("2d");
setSize();

function setSize(){
	canvas.width  = window.innerWidth;
  canvas.height = window.innerHeight;
}
ctx.beginPath();
ctx.rect(0,0, canvas.width,canvas.height);
ctx.fillStyle = "red";
ctx.fill();