Javascript: Using Async/Await with Loops

August 18, 2022 Snowball

The demo program below shows you how to use the async/await syntax with a for loop in modern Javascript: When running this program, you will see the tasks are executed sequentially one after another, and the…

Flutter: Adding a Border to an Elevated Button

August 18, 2022 Snowball

In Flutter, you can add a border (and customize its thickness and color as well) to an elevated button by using the ElevatedButton.styleFrom() static method like this: In case you need to create a rounded border,…

Flutter: Adding a Border to an Icon Button (2 Approaches)

August 17, 2022 Augustus

This quick article shows you a couple of different ways to create an icon button with a border in Flutter. Using IconButton and Container What you need to do is simply wrap an IconButton widget within…

React Router 6: How to Create a Custom Back Button

August 17, 2022 Snowball

This practical article shows you how to implement a custom back button in a React application that uses React Router 6 (the latest version). Besides the browser’s back button, our custom back button will add convenience…

React: Show an element when hovering over another element

August 17, 2022 Snowball

Let’s say we’re developing a React app, and we want to programmatically show a red box named box B when the mouse cursor is hovering over another box called box A. To achieve the goal, we…

React: Finding Elements by className

August 16, 2022 Snowball

In React, you can find elements with a certain className using the document.getElementsByClassName() method: If you only to get the first element in a bunch of elements that have the same className, do like so: For…

React: How to Disable a Button after One Click

August 16, 2022 Snowball

This example below shows you how to disable a certain button after it is clicked once in React. This can be useful in cases where you want to prevent the user from repeatedly clicking it multiple…

Displaying the Current Year in React

August 16, 2022 Snowball

In React, you can render the current year like this: The complete example below presents a copyright symbol along with the current year (you can see this everywhere on the internet). Screenshot: The code: Further reading:…

React: Using forEach()/for…of to Render a List

August 16, 2022 Snowball

When you need to render an array of objects in React, the most popular solution is to use the Array.map() method. However, there are other possible ways to get the same result, such as using the…

2 Ways to Merge Objects in TypeScript

August 16, 2022 Snowball

This quick article shows you 2 different approaches to merging 2 or more objects in TypeScript. Without any further ado, let’s get our hands dirty. Using the spread operator There are some important things you need…

2 Ways to Extend Types in TypeScript

August 16, 2022 Snowball

This short and straightforward article shows you a couple of different ways to extend a type in TypeScript. Without any further ado, let’s see the code. Using the “extends” keyword Example: Using the “&” operator Example:…

Hero Widget in Flutter: A Practical Guide (2022)

August 15, 2022 A Goodman

This article is about the Hero widget and hero animations in Flutter. We’ll have a glance at the essence of those things and then examine a complete example of using them in practice. The TL;DR In…

1 3 4 5 6 7 85