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

September 27, 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

March 2, 2023 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)

March 2, 2023 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

March 2, 2023 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

March 2, 2023 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

March 3, 2023 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

March 2, 2023 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…

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: How to Create a Custom Back Button

March 2, 2023 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

March 3, 2023 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…

1 4 5 6 7 8 79