Search [Enter] to search. Click anywhere to close.

Articles listed under Code Examples

January 13th, 2023

Make A React Custom Hook For API Calls And Data Fetching

Custom hooks in React can be extremely useful, so it’s no doubt a good idea to gain some familiarity with regards to writing your very own hooks. Let’s firstly go over the basics; what custom hooks are and how they can solve our problems. Then we’ll look at an example of how we can use […]

Read more ⤏
November 30th, 2022

Build A Python Anagram Guessing Game

Let’s build a simple anagram guessing game in Python! This is a simple project, and the final program is a short one, as you’ll see. You can play this anagram guessing game directly via the terminal, and the difficulty of the game is configurable based upon your own inputs (easy, medium or hard anagram options […]

Read more ⤏
November 24th, 2022

Build Your Own Python Password Generator

Let’s create a simple Python password generator. The password generator will be accessible via the terminal, and you’ll be able to configure various options to customise the output (password length, whether the password should contain special characters and so on). So with that in mind, let’s begin! The full password generator script We’re keeping this […]

Read more ⤏
September 11th, 2022

Build A React Password Strength Checker Component

Let’s walk through a simple React password strength checker component that can be dropped into your form(s) as and when required. You can find a working example of this component over here: React password strength checker component example. What this component does The role of this password validation component is to essentially verify that the […]

Read more ⤏
August 22nd, 2022

Build Your Own React Tooltip Component

Tooltips can be really useful. Essentially, the tooltip is a message or some other piece of information that displays upon hovering (or alternatively, clicking) some element with the user interface. Tooltips can be used to portray important information to the user in a clean and easily digestible manner. In this short guide, we’ll create our […]

Read more ⤏
August 15th, 2022

Build A Python Weather App

In this simple guide, we’ll use the OpenWeather API to fetch the 5 day weather forecast based on a user-supplied location using Python. This is a suitable Python project for beginners — the weather forecast script itself is fairly small, and we’ll go over it in considerable detail within this article. So with that said, […]

Read more ⤏
August 12th, 2022

Create A React Pagination Component

In this brief tutorial, we’ll go over the basics steps required to create your very own pagination component in React. Here’s the finished component for you to follow along with: JSFiddle containing the React Pagination Bar Component. The pagination mechanism your app uses is very important. Without an effective component to handle this aspect for […]

Read more ⤏

Build A Simple Python Currency Converter

In this article, we’ll walk through the creation of a simple Python currency converter. The user will be prompted to enter their initial currency, their target currency, and the amount they’d like to convert. From here, we’ll make a web request to a currency conversion API to retrieve the required information. We’ll then present it […]

Read more ⤏
April 29th, 2022

Create Your Own React Modal Component

Modals are very much a staple of the web. They are a handy way to use the screen’s available real estate to display content on-top-of content. Creating your own modal component in React is straightforward enough. This makes it a suitable task for React beginners to sink their teeth into, and it’s a good way […]

Read more ⤏
April 27th, 2022

Build A React Autocomplete Component

Autocomplete is a useful feature that’s also pretty fun to build in React. If your website or application has a search facility, it may be a good idea to include some sort of autocomplete functionality to assist your users and help them find what they are looking for more easily. To briefly summarize the functionality: […]

Read more ⤏
April 11th, 2022

Create A Game Of Hangman In React

Hangman is a particularly suitable game for beginners to look at replicating or recreating in React (or within JavaScript in general, in fact). This is because the fundamentals of the game revolve around some very common web-dev operations, most notably; the searching of strings. On top of this, the developer will have the opportunity to […]

Read more ⤏
December 1st, 2021

React Quiz App Example – A Tutorial

This article covers the creation of a simple React quiz app that should prove useful to entry-level React developers. You can view the quiz app here in JSFiddle. The quiz app is about as basic as it can get in terms of functionality, but it provides a solid foundation on which to experiment or to […]

Read more ⤏
November 11th, 2021

Build A React Carousel Component With Infinite Scroll

The carousel is a classic piece of functionality. It’s a mechanism that the user can utilize to scroll through slides of content, image-based or otherwise. Here’s the accompanying infinitely-scrolling React carousel example (accessible directly in JSFiddle). This carousel example provided is very much a “bare-bones” implementation. I’ve tried to capture the core functionalities in the […]

Read more ⤏
November 7th, 2021

A Simple React Accordion Component Example

This article will walk through some of the key points and aspects of an accordion build within React. You can find the accompanying JSFiddle component over here: React accordion component example. This is a small and relatively simple component. But that’s why it’s a good example for React beginners to look at. Alongside the accompanying […]

Read more ⤏
October 31st, 2021

React Calendar Component Example (With Events)

In this article, we’ll go over the build of a React calendar component. This calendar can also display events. You can view the React calendar component example in question directly in JSFiddle. If you’re fairly new to React, don’t worry — building a React calendar component is fairly straightforward. It is, in fact, much easier […]

Read more ⤏