Devtrium

Hey 👋 welcome to Devtrium!

We are here to help you level up your front-end skills!

Tutorials

Use the search below to filter by title, description and tag. There are 11 tutorials currently.

React & TypeScript: how to type hooks (a complete guide) (thumbnail)

React & TypeScript: how to type hooks (a complete guide)

Hooks are a fundamental aspect of writing React components, so knowing how to type them is vital to using TypeScript with React. Let's see how to do that!

October 12, 2021
React & TypeScript: use generics to improve your types (thumbnail)

React & TypeScript: use generics to improve your types

TypeScript generics in React are very useful, but can be scary when you don't know how they work. This article will help you understand generics and how to use them in React.

October 05, 2021
How to use React useReducer hook like a pro (thumbnail)

How to use React useReducer hook like a pro

The React useReducer hook is another way to manage state in components. But do you know when to use it vs useState, and how? We'll learn that (and more) in this article.

September 20, 2021
How to use React Context like a pro (thumbnail)

How to use React Context like a pro

React Context can be a very powerful tool, and there are several tricks to using it effectively. Several patterns can be used to empower your context use.

September 13, 2021
React events and TypeScript: a complete guide (thumbnail)

React events and TypeScript: a complete guide

Learn how to handle onClick, onChange, and many other events on React with TypeScript. It's a bit harder than you'd think but easy once you know how to do it!

September 02, 2021
How to add keyboard shortcuts to your React app (thumbnail)

How to add keyboard shortcuts to your React app

Adding keyboard shortcuts to a React app can empower your users to use it more effectively, and it's pretty simple! We'll see how to do it in this article.

August 18, 2021
How to use async functions in useEffect (with examples) (thumbnail)

How to use async functions in useEffect (with examples)

Using asynchronous functions in a useEffect hook is quite common, notably for data fetching. Let's see several ways of going about it!

August 14, 2021
What are dependency arrays in React? (thumbnail)

What are dependency arrays in React?

If you want to use functional components in React, you'll have to deal with dependency arrays. Do you know how to use them and what purpose they serve?

August 08, 2021
How to set an interval in React (with examples) (thumbnail)

How to set an interval in React (with examples)

setInterval allows us to schedule an action in the future. It's often very useful in web apps. Let's see how to set it up in React apps.

August 02, 2021
How to set a timeout in React (with examples) (thumbnail)

How to set a timeout in React (with examples)

setTimeout allows us to schedule an action in the future. It's often very useful in web apps. Let's see how to set it up in React apps.

July 27, 2021
How to sleep in JavaScript? (thumbnail)

How to sleep in JavaScript?

Have you ever wanted your JavaScript code to pause for a certain amount of time? Here's how to do it!

July 23, 2021