
Optimising gatsby‑image Even Further
Optimise gatsby‑image with sensible maxWidth and quality settings, GraphQL image data, and selective use of the native loading attribute in Gatsby.
Articles
JavaScript is the working language behind most of my front‑end writing, from small browser behaviours to application state and asynchronous code. These articles favour the mechanism behind a feature over a clever trick, whether the subject is callbacks, async code, or a language edge that only becomes obvious in production.

gatsby‑image Even FurtherOptimise gatsby‑image with sensible maxWidth and quality settings, GraphQL image data, and selective use of the native loading attribute in Gatsby.

Finding and replacing numbers in a string with JavaScript is a relatively straightforward task, although which regex you use (and how) can impact readability.

Browsers now support the copy event, which allows developers to intercept and modify content placed onto a clipboard, when copied from their site.

Dynamic imports and code splitting in Next.js explained with next/dynamic, lazy‑loaded components, SSR trade‑offs, and when splitting really helps.

Add static files to a Gatsby site using the static folder, with notes on build output, verification files, legacy assets, and when not to process files.

Deploy a static Gatsby build over FTP with environment variables, ftp‑deploy, build scripts, and a practical CI flow for conventional or legacy hosting.

Orphans are annoying single‑word lines of text that hang at the end of a paragraph. It is straightforward using React and JS to banish them from your site.

getStaticPaths in Next.jsgetStaticPaths in Next.js explained with dynamic routes, pre‑rendered paths, fallback behaviour, and how static generation works for slug‑based pages.

Render greater‑than and less‑than symbols in JSX safely, using strings or HTML entities whilst avoiding parser confusion and awkward React output.

Comment in JSX without breaking React parsing, including curly‑brace block comments, why HTML comments fail, and gotchas around rendered output clearly.

getStaticProps vs. getServerSideProps in Next.jsgetStaticProps vs. getServerSideProps in Next.js explained with build‑time and request‑time data fetching, trade‑offs, and practical page examples.

Building custom hooks in React explained with reusable stateful logic, naming rules, composition examples, and why hooks share logic rather than state.

Compare static generation and server‑side rendering in Next.js through freshness, request‑time data, performance, SEO, operational cost, and page intent.

The differences between throttling and debouncing in JavaScript, including practical TypeScript code examples. Optimise event handling and improve performance.

Replacing every instance of a string in JavaScript depends on what you are matching. This guide covers replaceAll(), regexes, and older fallbacks.

Measure element dimensions in JavaScript with clientWidth, offsetWidth, getBoundingClientRect(), innerWidth, outerWidth, and responsive layout cautions.

useReducer in ReactuseReducer in React explained clearly, including reducer functions, action objects, complex state updates, and when it is a better fit than useState.

A brief explanation of how to check if three variables are equal in JavaScript using the equality operators, ternary operator and Array.prototype.every method.