React Gantt Chart Component: Library and Custom Build

React Gantt chart component: three dependent tasks rendered by gantt-task-react with a task list and week columns

A Gantt chart shows tasks as bars on a timeline, with dependencies between them. In React you have two sensible routes: install a library, or build a small chart yourself with CSS grid. This guide does both. The library part uses gantt-task-react, which is free, MIT-licensed, and gives you dependency arrows, drag and resize, progress … Read more >>

How to Filter an Array of Objects in TypeScript

Filter an array of objects in TypeScript: Command Prompt output of filtering orders by status, total and city

To filter an array of objects in TypeScript, pass filter() a function that tests a property: orders.filter(order => order.status === “shipped”). You get a new array of the same object type, the original is untouched, and the compiler checks every property name as you type it. This guide covers filtering by one property and by … Read more >>

How to Use react-vertical-timeline-component in React

React vertical timeline component: two timeline cards with blue numbered icons rendered by react-vertical-timeline-component

react-vertical-timeline-component renders a vertical timeline in React: a centre line with cards alternating left and right, each with a date and an icon. You install it, import its stylesheet, and put a <VerticalTimelineElement> inside a <VerticalTimeline> for every event. This guide builds one step by step, with a screenshot of what each version actually renders, … Read more >>

Python / vs //: True Division and Floor Division

Python division operators: Command Prompt output comparing 7 / 2, 7 // 2 and 7 % 2 and the types they return

Python has two division operators. / is true division and always returns a float, so 7 / 2 is 3.5 and even 8 / 4 is 2.0. // is floor division: it divides and then rounds down, so 7 // 2 is 3. The difference that catches people out is negative numbers, where -7 // … Read more >>

How to Repeat Code, Functions and Values in Python

Repeat in Python: Command Prompt output of a for loop repeating a line three times and a string and list repeated with the star operator

Python has no built-in repeat() function, and what you need depends on what you are repeating. To repeat code a fixed number of times, use for _ in range(n). To repeat it until something happens, use while True with a break, because Python has no repeat-until loop. To repeat a value, multiply it: “ab” * … Read more >>

React Date Picker Component: A Practical Guide

React date picker component: the react-datepicker calendar open below a delivery date field in a React 19 app

A React date picker component gives users a calendar to choose a date from instead of a free-text field. You have two realistic options: the browser’s own <input type=”date”>, which costs nothing and looks different in every browser, or the react-datepicker library, which is the one most projects mean when they say “React date picker”. … Read more >>

How to Loop Through an Array in TypeScript

Loop through an array in TypeScript: Command Prompt output of for...of, an indexed for loop and forEach over an array of cities

To iterate over an array in TypeScript, use for…of when you only need the values, a classic for loop or entries() when you need the index, and forEach() when a callback reads better. All three keep full type safety: the loop variable gets the array’s element type, so string[] gives you a string. This guide … Read more >>

Difference Between Let vs Const in TypeScript

When to Use let and const Variable in TypeScript

When declaring variables in TypeScript, you have three variables: let, const, and var. Understanding these variables is crucial for writing clean, maintainable, and error-free TypeScript code. In this tutorial, we’ll focus on the difference between let vs const in TypeScript, and when to use each one. Understand the let Variable in TypeScript The let the … Read more >>

Difference Between Protected vs Private in TypeScript

Difference Between Protected vs Private in TypeScript

TypeScript, a superset of JavaScript, introduces several features that enhance the development experience by adding static types. Among these features are access modifiers, which control the visibility and accessibility of class members. In this tutorial, we will explore the difference between the protected vs private in TypeScript, their use cases, and provide detailed examples to … Read more >>

TypeScript Promises: A Comprehensive Guide

Create Promise Utility in TypeScript

As a TypeScript developer with years of experience, I’ve found that promises are one of the most powerful features when dealing with asynchronous operations. Whether you’re fetching data from an API, reading files, or executing time-consuming tasks, promises help you manage the flow of your application. Recently, I was working on a TypeScript project where … Read more >>