Search

Post types:
Categories:
🔖

Clean JavaScript Cheat Guide

Read Note

An adaptation of Robert C. Martin's book Clean Code for JavaScript (ES6+) full of best practice examples and (probably more importantly) common anti-patterns that they can …

🔖

Intro to JavaScript promises

Read Note

An overview of JS promises for all skill levels. Starts with an excellent analogy of thread-blocking as …

🔖

Zero JavaScript CSS-in-JS

Read Note

One of the core downsides to CSS-in-JS is that you have to compile it on the client, which means increased bundle sizes and slower rendering. Linaria is an attempt to fix that, by providing all of …

🔖

Understand JavaScript closures in minutes

Read Note

I always forget what closures are, even if I continue to use them. The article makes a case for considering closures as stateful functions which is quite neat. Basically, closures allow a …

🔖

Inversion of Control

Read Note

I have a tendency to prefer the kind of "inside-out" control that Kent is advocating in this piece, though I've never head it called "inversion of control" before. The idea of giving your users the …

📖

JSNation Live 2020 Notes

Read Article

Another month, another big and fully remote JavaScript conference. JSNation fit into my schedule a little less (and didn't quite overlap with my interests as neatly) but it was a fun event with some interesting talks on topics that are often only on my periphery. Much to think about!

🔖

Jamstack is fast only if you make it so

Read Note

Critique of JavaScript-heavy frontend frameworks and useful deep-dive into the issues of using client-side scripts or libraries for webmentions. Nicolas rightfully points out that this isn't just …

🔖

Progressively enhancing forms

Read Note

Developers seem to have invented a thousand different ways to avoid using HTML forms these days, which constantly makes me think we're all reinventing the wheel. Surely there's a simpler, more …

📖

Adding Search: Refining The Frontend (Algolia, Gatsby, Craft CMS - Part 3)

Read Article

The search page is live, the index is populated, but it all looked a bit rubbish and it didn't quite work as well as I wanted. Now it's using custom-styled components, queries are tracked/stored via the URL for persistence, and you can filter results based on category.

🔖

Generate an SEO-friendly sitemap for Gatsby

Read Note

Josh keeps publishing articles that are both interesting to read and specifically useful to problems that I'm currently working on, but this time his article became the inspiration to solve a problem …

📖

Jamstack Conf 2020

Read Article

Notes from the 2020 Jamstack Conf. Some interesting dives in the Jamstack community and various applications of Jamstack technologies, with tweet threads as usual.

🔖

Dark mode in Gatsby

Read Note

Josh outlines the various steps required to get a dark mode theme working properly in Gatsby. I've been wondering about adding a dark mode at some point and, honestly, I'm amazed by the number of …

🔖

CSS variables for React devs

Read Note

Josh breaks down why and how you can use CSS variables more easily in React, specifically using styled-components. Honestly it feels a little terrifying how much is needed just to get basic …

🔖

Three ways to autofocus in React (that almost always work)

Read Note

Whilst accessibility means you largely want to steer clear of autofocus on web forms, sometimes it can be beneficial. In HTML, we can now reach for the handy autofocus attribute, but as I recently …

🔖

React modal using <dialog> element

Read Note

An extremely detailed overview of how to use the native <dialog> element in React to build a state-driven modal component. As ever, the answer is significantly more complicated than it would be …

Published:
Categories:
  • HTML & CSS
  • JavaScript
Tags:
🔖

Jamstack slide decks

Read Note

I needed to throw together a quick presentation for an internal team meeting at work, but I've maxed out my Slides.com free usage and really hate Google's offering, so went digging for something …

🔖

How to use React Context Effectively

Read Note

I guess I'm reading up on React Context a lot today. Kent provides a useful step-by-step guide in his normal steady manner, which I found pretty easy to grasp. He also makes a very valid …

🔖

Var, let, and const, what's the difference

Read Note

var is globally scoped and hoisted, which can lead to unintended side effects. let is block-scoped and can never be redeclared within that scope – much harder to break, but need to be careful about …

🔖

Estimate page savings with modern JS

Read Note

A quick tool to check how much page weight could be saved if you removed all legacy JavaScript from a webpage, in favour of modern …

🔖

The random link in the age of static sites

Read Note

Heydon has been working on Ga11ery, a neat image portfolio site generator that's ideal for webcomics. But it's built on the Jamstack using 11ty and Netlify, which means it isn't so simple to …

🔖

Array functions and the rule of least power

Read Note

The various array methods in JavaScript can be thought of on a scale of power, or really flexibility. At the top end you've got the for loop, at the bottom the highly-specific functions …

🔖

Manage Global State with Contact API and Hooks

Read Note

Jonas has put together a useful overview of why the "new" Context API in React is probably a better option than Redux for many simple use cases, as well as step-by-step instructions on how to set up …