Dart: Get Host, Path, and Query Params from a URL

August 22, 2022 Hadrianus

In Dart, you can extract useful information from a given URL string by following the steps below: 1. Construct a Uri object from your URL string: 2. Now, you can get what you want through various…

Using GetX to make GET/POST requests in Flutter

August 21, 2022 A Goodman

GetX is a massively functional and open-source Flutter library that is the most popular these days, with over 10,000 likes on pub.dev. Although GetX provides a wide range of features, each feature is contained in a…

React: Create a Reusable Switch/Toggle Component

August 20, 2022 A Goodman

In web and mobile apps, a switch or a toggle lets users choose between a pair of opposing states, like ON and OFF, LIGHT and DARK, ACTIVE and INACTIVE, using a different appearance to indicate each…

React: Removing Items from a List (Full Example)

August 20, 2022 A Goodman

When developing web apps with React, there are innumerable cases where we have to render a list of things, such as a list of users, a list of tasks, a list of products, etc. In these…

React: Programmatically Scroll to Bottom/Top of a Div

August 20, 2022 A Goodman

This concise and practical article shows you how to programmatically scroll to the bottom or to the top of a scrollable div element in React. The TL;DR Here is the process that we will go through:…

React: Update Arrays and Objects with the useState Hook

August 19, 2022 A Goodman

This practical and straight-to-the-point article shows you how to update objects and arrays in the state in React correctly. We’ll use the useState hook and functional components. Without any further ado, let’s get started. The TLDR…

React: Changing Button Text on Click

August 19, 2022 Snowball

The example below shows you how to change the text of a button after it gets clicked in React. We’ll use the useState hook to get the job done. App Preview The Code Explanation 1. Store…

React Router: 3 Ways to Disable/Inactivate a Link

August 18, 2022 A Goodman

This succinct, practical article shows you 3 different ways to disable/inactivate a Link in a React application that uses React Router 6 (the latest version). We will explore the fundamentals and then apply them in a…

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…

1 2 3 4 5 6 85