
Toggle a Boolean in JavaScript
A brief explanation of how to toggle a variable in JavaScript by inverting its value. Learn how to switch a variable from true to false and vice versa.
Articles
Front‑end development is where product intent becomes the interface people actually use. My writing approaches it as engineering rather than surface decoration, with attention to browser behaviour and code that remains accessible, fast, and safe for a team to change.

A brief explanation of how to toggle a variable in JavaScript by inverting its value. Learn how to switch a variable from true to false and vice versa.

Dynamic routes in Next.js explained with [slug] pages, route params, nested segments, and why file‑based dynamic routing simplifies content‑driven sites.

Math.random()JavaScript Math.random() explained beyond the basics, including pseudo‑random generation, browser history, ranges, array indexes, and randomness limits.

How Shopify Liquid theme constraints affect products, sections, apps, checkout, SEO, performance and the decision to stay theme‑based or go headless.

useRef in ReactUse useRef in React for DOM access, focus management, mutable values, previous values, integration work, and cases where refs should not replace state.

How Liquid templates shape e‑commerce front‑end work, including products, collections, snippets, theme constraints, content, and safe customisation.

Liquid is a small templating language with a lot of reach. This article explores its syntax, control flow, and why it shows up in so many CMS tools.

React Hooks, introduced in React 16.8, bring state and lifecycle features to functional components. Here, I explore how they work and why they matter.

forEach Does Not Wait for async CallbacksSee why forEach() ignores promises returned by async callbacks, then choose sequential for...of or concurrent Promise.all() with clear failure handling.

Check rendered HTML for JavaScript pages by comparing source and DOM output across metadata, headings, links, schema, content, hydration, and crawlability.

Class and functional components are key to React development. In this article I explore differences, advantages, and when to use each in modern React apps.

How client‑side rendering can affect search visibility, and what to check around content, links, metadata, routing, loading states, and fallbacks.

_app and Custom _document in Next.jsCustom _app and _document in the Next.js Pages Router: shared layout, application setup and server‑rendered HTML, with historical Next.js 8 examples.

The JavaScript event loop manages asynchronous tasks in a single‑threaded environment. I explore how it works with the call stack, task queue, and microtasks.

Create interactive interfaces with HTML, CSS and JavaScript, using semantic controls, accessible state, event handling, and progressive enhancement.

async/awaitUse async and await to simplify asynchronous JavaScript, with promise comparisons, error handling, readable control flow, and common pitfalls in real apps.

AbortControllerHow to prevent race conditions in JavaScript with AbortController, including stale search results, request cancellation, and browser support caveats.

next/link for Client‑Side Navigation