Javascript

How To Test a React App with Jest and React Testing Library — step-by-step Javascript tutorial on Progressive Robot

How To Test a React App with Jest and React Testing Library

Obtaining solid test coverage is imperative for building confidence in your web application. In this tutorial, you will test asynchronous code and interactions in a sample project containing various UI elements. You will use Jest to write and run unit tests, and you will implement React Testing Library as a helper DOM library to handle interacting with components.

Read more
How To Use Generics in TypeScript — step-by-step Javascript tutorial on Progressive Robot

How To Use Generics in TypeScript (Quick Reference)

Generics are a fundamental feature of statically-typed languages, allowing developers to pass types as parameters to a type, function, or other structure. TypeScript fully supports generics as a way to introduce type-safety into components that accept arguments and return values whose type will be indeterminate until they are consumed later in your code. In this tutorial, you will try out real-world examples of TypeScript generics to make your code more re-usable.

Read more
How To Use Static Files in Gatsby — step-by-step Javascript tutorial on Progressive Robot

How To Use Static Files in Gatsby

Like many popular Static Site Generators, Gatsby embraces the use of dynamic web frameworks, using React on the frontend and Node.js on the backend. But Gatsby can also pull in static files and assets, like images, CSS files, and JavaScript files. This tutorial will show you how to best go about adding images, stylesheets globally and as modules, JavaScript files, and arbitrary files like PDFs for your users to download.

Read more
How To Work with Files using the fs Module in Node.js — step-by-step Javascript tutorial on Progressive Robot

How To Work with Files using the fs Module in Node.js

With Node.js, you can use JavaScript to programmatically manipulate files with the built-in fs module. The name is short for “file system,” and the module contains all the functions you need to read, write, and delete files on the local machine. In this article, you will use the asynchronous fs module to read a file with fs.readFile(), create and write to a new file with fs.writeFile(), delete the file with fs.unlink(), and move the first file with fs.rename().

Read more
How To Write Your First JavaScript Program — step-by-step Javascript tutorial on Progressive Robot

How To Write Your First JavaScript Program

This tutorial will walk you through creating a “Hello, World!” program in JavaScript. To make the program more interesting, we’ll modify the traditional “Hello, World!” program so that it asks the user for their name. We’ll then use the name in a greeting. When you’re done with this tutorial, you’ll have an interactive “Hello, World!” program.

Read more
CHAT