Thinking in React hooks
Read NoteI'm not going to lie, some of Amelia's breakdown of why hooks > class components went over my head, but the reasoning is solid (plus, preaching to the converted 😉). Even better, though, is …
theAdhocracy
I'm not going to lie, some of Amelia's breakdown of why hooks > class components went over my head, but the reasoning is solid (plus, preaching to the converted 😉). Even better, though, is …
Another great overview of how to use the `react-hooks` extension for the Testing Library suite, with some more complex examples than many other …
I've been doing a fair amount of testing React hooks recently. Part of that has been learning the `react-hooks` extension for the Testing Library suite, which took a while to wrap my head around. …
Sound has definitely been abused on the web, but I agree with Josh that it shouldn't be ignored completely. There is still a time and place for using sound to great …
A very hand overview of the core concepts in React, from JSX to fragments to hooks. Includes quick reference to the core hooks and how/when to use them e.g. useState, useContext, useMemo …
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 …
I've long wondered whether there were any particular gotchas with React when it came to using the prefers-reduced-motion flag. Well, Josh has written up the answer (and, as usual, extremely well). …
I received an Amazon Echo for my birthday. I honestly wasn't expecting to, so it was a really fun and exciting surprise to unwrap; although, I have to admit that my initial reaction was "What am I …
Welcome to the third version of theAdhocracy! It's been a long time coming, but the site has finally been rebuilt, rehosted, and re-just-about-everything else, so I figured I'd actually formalise the launch with a new post explaining what's happened and why.
A look back and a look forward... it must be the start of a new year. 2019 held a lot of change and personal improvement, but I can't help but feel that 2020 is going to be a big one. So what exactly do I have planned and what am I hoping for the next 12 months?
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 …
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 …
A great explanation of why two-pass rendering is a useful mental model to consider when working with server-side rendering/SSGs like Gatsby and JavaScript frameworks. The main point? …
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.
Having hooked up Algolia with my Gatsby build pipeline and populated a search index from my Craft CMS API, the next step was the build a frontend UI to enable users to actually query my posts. It turned out to be a pretty simple process.
The idea of a great divide in front-end development resonated with me. I'm worried about how the erosion of certain skills could lead to a less inclusive, accessible web, for both users and developers. On the other hand, there are some massive advantages to our new tools. It's a double-edged sword.
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!
Recoil is a new state management library from Facebook (though note this isn't an official React project). Doesn't seem to do anything too fancy, but does use a similar mental model to hooks …
The combination of the Carbon design system and NextJS should make for rapid website development, but I ran into a few small hurdles getting them to play nicely with one another using existing documentation and community guidelines.
A fascinating look at how modern front-end architecture and practices can help solve some of the communities issues; even the ones they initially created! Really neat to see how Brad has been using …
Styled Components have tripped me up a few times today, but I ended up learning some useful tricks as a result.
I've been saying for years that React feels like jQuery did circa 2010: it's used everywhere, its devotees are numerous, but the leading edge left it in the dust a while ago. I do think that Hooks …
Understanding why non-interactive Storybook components are often announced as clickable by NVDA and other screenreaders.
A quick (and dirty) way to fetch local data from a JSON file and modify the look of a page in Astro, completely natively.
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 …
2023 was another BIG year in terms of, well, everything. We travelled all over the world. We attended scores of major events. And we got married. It's taken a while to write up, as a result!
Storybook encourages setting the same arguments over and over and over again, but this is a pain to maintain. There is a better, DRYer approach, it's just not well documented.
Somehow, I've been writing these little blurbs for an entire decade now. What better time to take a look back at how this site has evolved.