
Optimising Performance in React with useMemo and useCallback
Optimise React performance with useMemo and useCallback only where profiling shows expensive calculations, unstable functions, or avoidable re‑renders.
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.

useMemo and useCallbackOptimise React performance with useMemo and useCallback only where profiling shows expensive calculations, unstable functions, or avoidable re‑renders.

Solve Binary Tree Zigzag Level Order Traversal with breadth‑first search, level sizing, alternating output order, and TypeScript implementation details.

How ISR improves Next.js performance by mixing static speed with controlled freshness, and where it fits best over fully dynamic rendering for changing content.

Reversing an array in JavaScript can be done with `.reverse()`, but it mutates the original array. Here, I explore immutable methods and older techniques.

Memory leaks in React can cause sluggish performance and excessive memory usage. Here, I explore common causes, how to prevent them, and debugging techniques.

How to create custom Vue directives for DOM‑level behaviour, without reaching for them when a component, prop, or composable would do better in real interfaces.

Solve Binary Tree Level Order Traversal with breadth‑first search in TypeScript, using a queue, level sizing, edge cases, and cleaner iteration well.

Solve Subarray Sum Equals K with prefix sums and a hash map in TypeScript, including negative numbers, count storage, and why sliding window fails.

Sorting complex arrays in JavaScript requires custom comparison functions. Here, I explore techniques for sorting numbers, objects, nested properties, and more.

Solve Word Search with backtracking in JavaScript, covering recursive path exploration, visited state, pruning, restoration, and grid trade‑offs.

Solve Linked List Cycle with fast and slow pointers in TypeScript, comparing visited‑node storage with Floyd's cycle detection and common mistakes.

Solve Single Number in TypeScript with XOR bit manipulation, comparing hash maps, constant extra space, duplicate cancellation, and why the trick works.

Build a reusable Vue 3 composable with the Composition API, covering side effects, useOutsideClick, browser boundaries, typing, and testability well.

How to solve Number of Islands with grid traversal, treating the matrix like a graph, marking visited land safely, and reasoning about DFS in TypeScript.

provide/inject API: When and How to Use ItWhen Vue provide/inject is the right tool, how to keep it reactive, and where it fits better than props or a full store in larger component trees.

Vue 3 replaces Vue 2's getters and setters with JavaScript proxies. This article explains how they differ and why proxies improve Vue's reactivity system.

Optimise Vue.js performance with lazy loading and code splitting, covering route‑level chunks, async components, bundle strategy, measurement, and UX.

How to solve Longest Substring Without Repeating Characters with sliding window basics, comparing Set and last‑seen‑index approaches in TypeScript.