Check out example codes for "html canvas write text". It will help you in understanding the concepts better.

Code Example 1

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

ctx.font = "30px Arial";
ctx.fillText("Hello World", 10, 50);

Learn ReactJs, React Native from akashmittal.com