
The React Context API: When to Use It and When Not to
The React Context API explained with Provider and Consumer examples, prop drilling trade‑offs, shared app state, and when context is not the right answer.
Articles
JavaScript is probably one of the most‑used programming languages in the world, and a cornerstone of front‑end (and more general) web development. It enables the development of interactivity and features that HTML and CSS alone simply cannot, and includes more advanced concepts like closures, callbacks, and asynchronous programming.
Below you will find a subset of articles from my blog specifically about JavaScript. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are three hundred collected together for you below.

The React Context API explained with Provider and Consumer examples, prop drilling trade‑offs, shared app state, and when context is not the right answer.

Merging objects in JavaScript is straightforward once you know the tools. This guide covers Object.assign(), spread syntax, and overwrite behaviour.

Event bubbling and capturing in JavaScript explained through propagation phases, event delegation, target/currentTarget, stopPropagation(), and handler order.

JavaScript frameworks streamline development with reusable components, state management, and optimised rendering. Here, I compare React, Vue.js, and Angular.

The Fetch API for beginners, including GET requests, POST requests, JSON handling, `response.ok`, and why failed fetches need explicit error checks.

Tagged template literals let you intercept and reshape template literal output. This guide explains the syntax and why the feature can be useful.

Escape and unescape special characters in JavaScript for strings, HTML, regular expressions, safe output, parsing, and practical data handling safely.

Integrating CMSes with HTML, CSS, and JavaScript enables dynamic, flexible content management. Here, I explore best practices, performance tips, and SEO.

React error boundaries explained with fallback UI, componentDidCatch(), getDerivedStateFromError(), logging, placement strategy, and what they cannot catch.

Object.keys(), Object.values(), and Object.entries() ExplainedObject.keys(), Object.values(), and Object.entries() explained for JavaScript objects, including iteration, snapshots, validation, and helper choice.

File‑system routing in Next.js explained clearly, including the `pages` directory, nested routes, index files, and why routing feels simpler than custom setups.

JavaScript hoisting moves declarations to the top of their scope. Here, I explore its impact on variables, functions, and best practices for avoiding pitfalls.

Closures let JavaScript functions retain access to parent scope variables. Here, I explore closures, scope, and practical uses for cleaner, more efficient code.

Static methods vs. instance methods in JavaScript classes explained clearly, including when to use each, common mistakes, and how class APIs stay readable.

Mutation and immutability in JavaScript explained through arrays, objects, push(), splice(), shared references, UI bugs, and safer update patterns.

Array.includes() vs. indexOf() in JavaScriptCompare Array.includes() and indexOf() in JavaScript, including boolean checks, returned positions, NaN handling, readability, and membership tests.

React Portals explained with modals, overlays, and tooltips, including DOM placement, event bubbling, accessibility concerns, and when portals help.

CSS and JS animations enhance user experience by adding smooth transitions and interactivity. Here, I explore best practices, performance, and the real‑world.