Give your users functionality like adding signatures, shapes, or drawings

Image for post
Image for post
Image source: Author

HTML5 introduced the canvas element for efficiently drawing to the screen. Let’s explore how we can integrate a canvas into a React application. We will write the code in TypeScript.

Get Started

Create a new React project by opening a terminal window and running the following command:

npx create-react-app canvas-app --template typescript

Opening the project in Visual Studio Code (or the code editor of your choice). Then open the App.tsx file and replace the code with the following:

Run the project by returning to the terminal and running npm start. …

Uppercase the first letter in a word, title case a string, and more

Image for post
Image for post
Photo by Hu Chen on Unsplash

In this piece, we’ll explore how to implement some basic algorithms in JavaScript. These algorithms are the ones you’ll typically first encounter when you start going beyond the basics of JavaScript.

New developers must eventually tackle algorithms, so it’s never too early to start mastering them. Developers with a previous knowledge of programming but new to JavaScript may run into unexpected surprises.

What Are Algorithms?

Algorithms are a step-by-step process for accomplishing some task. The task must be something that can actually be done — and can be done in a reasonable amount of time. …

Going beyond the basics

Image for post
Image for post
Photo by Daniel Jerez on Unsplash

For JavaScript programmers who’ve already taken the plunge and learned the basics of TypeScript, this piece will show you more advanced usages of the language. We’ll also take a brief look at two important concepts every object-oriented programmer should know about: SOLID and design patterns.

For those new to TypeScript or those needing a refresher, you can check out my other piece, “Going from JavaScript to TypeScript.”

Abstract Classes

In JavaScript, there’s only type of class, but in TypeScript there are two types. …


Richard Prasad

Full-stack web developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store