Sign in

Cathal Mac Donnacha

@cathalmacdonnacha.com
81 followers 168 following 125 posts

Principal Frontend Engineer @wpengine. Follow along for frontend tips on React ⚛️ Testing 🧪 UI/UX 🖥. My blog ✍️ cathalmacdonnacha.com

PostsRepliesMedia
Cathal Mac Donnacha @cathalmacdonnacha.com · 30/03/2026
I'd love to see more real world examples. Perhaps that's just something I can search across GitHub, but I'd love official guidance on how to deal with hundreds of handlers with scenarios, how to structure them all, keep them performant (import all handlers at once Vs just the few that are needed).
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/03/2026
I'm going to experiment with migrating to Vitest + browser mode to see if that improves things.
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/03/2026
If you're still using Jest, you may find this article useful to help speed up your tests. cathalmacdonnacha.com/fixing-slow-... #frontend #jest #testing
cathalmacdonnacha.com
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 04/03/2026
claude --worktree is amazing 🤌
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/09/2025
What are some ways AI tools have helped you with your frontend projects? Specifically the design side. #frontend #ai #claude #chatgpt #webdev
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 23/08/2025
Hey Artem, curious if you ever get around to this one? If so, how did it go?
121
Cathal Mac Donnacha @cathalmacdonnacha.com · 21/08/2025
I tend to use pagination when users need shareable links or to give a sense of how much data is left (e.g. “page 3 of 10 in blue t-shirts”). Use virtual scroll for endless browsing (e.g. social feeds). 📑 Pagination = easy to share & measure. 📜 Virtual scroll = easy to scroll. #frontend #ux #webdev
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 27/07/2025
When diving into a new codebase I find that tests serve as the best documentation. #software #webdev #programming
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 17/07/2025
I guess ChatGPT is training itself on my blog now 😂 #blogging #chatgpt #software
Screenshot of referrers from a blog (http://cathalmacdonnacha.com/)
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 18/06/2025
TIL: Chrome Dev Tools has an accessibility view ♿️ #frontend #chrome #webdev
accessibility view in chrome dev tools elements tab
120
Cathal Mac Donnacha @cathalmacdonnacha.com · 14/06/2025
This is a real level headed take on AI and the perceived notion that it's going to completely take over software engineering roles: youtu.be/mbEzhI3cmmo?...
youtu.be
The Truth About Software Development with Carl Brown | Better Offline
YouTube video by Better Offline
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/06/2025
Google cloud build
100
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/06/2025
We find our current jest/JSDOM/testing library setup varies quite considerably. Our fast Macbooks run test quote fast, but can sometimes fail on our CI machine due to timeouts.
210
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/06/2025
How do you manage the difference in test times between local and ci? Tests which run fine locally could be slow on ci and timeout/fail. Depends on the resources used on the ci machine I guess.
100
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/06/2025
I love the idea, but if I was to try and evangelise this in my team I feel like it would just come across as another thing to maintain. I can't say we've hit a pain point where API field changes have broken things either as we have good communication. Still intrigued though!
010
Reposted by Cathal Mac Donnacha
React @react.dev · 22/04/2025
React Compiler RC is now available! We've added support for swc and are working towards a stable release react.dev/blog/2025/04...
react.dev
React Compiler RC – React
The library for web and native user interfaces
010625
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Before I begin any refactoring, I always have a look at the tests first to make sure they're up to scratch. This way I can be fairly confident that I won't break anything in the process. Emphasis on "fairly". 😂 #software #programming #frontend
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
For sure. I'm cool to use it if it's in and around the same speed, and of course there's a trade off with gaining confidence with less mocking, but if a test suite takes double the amount of time, that's double the resources on our CI/CD machine, which could be a no-go.
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Nice, I think I just need to sign up to the course 😁 That's the amazing thing, less mocking when not needed. Have you noticed much of a speed difference between browser mode and running the likes of JSDOM?
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Yea, mocking "navigate" in jsdom has been a pain for us. Have you experienced slower test speeds given you're spinning up a browser?
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
I wonder what the reluctance is to move it from experimental to beta? For better or worse, companies I've worked for in the past have had policies to only use production ready libraries. Beta or experimental weren't allowed, no matter how safe they were perceived to be.
210
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Nice. I'd be interested to hear about that experience in terms of speed and dx differences. Right now our jest tests often time out. We also often have to mock "window.location" if a button triggers a "navigate" to another URL. Can those scenarios be handled in vitest browser mode?
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Yea I have been following browser mode in vitest, but it's still in experimental mode right? I don't think I could recommend it to my teams just yet until it's production ready. Do you find it much slower compared to a typical jest test?
310
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
I have been keeping an eye on that, but as far as I know it's still in experimental mode right? I wouldn't be able to start recommending that to my teams until it's production ready tbh. Looking forward to that though. Is running in browser mode with vitest slower than a typical jest test?
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
Do you still use Jest/Vitest with React Testing Library? I would much prefer testing using a real browser, but have always found these to be much faster to write and easier to maintain.
210
Cathal Mac Donnacha @cathalmacdonnacha.com · 03/04/2025
We actually use Playwright as well and I did up an ADR to compare it with Cypress before pulling the trigger. It's outdated, but these were the reasons: cathalmacdonnacha.com/cypress-vs-p...
cathalmacdonnacha.com
Cypress vs Playwright: Which is best for E2E testing?
Cypress was our go-to end-to-end (E2E) testing tool, and we were pretty happy with it, up until recently that is. Lately, we've run into a couple of testing scenarios where Cypress support has been limited, notably around multiple domains/tabs and iF...
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/04/2025
"To persuade a few is better than to convince many." This has always been my approach when introducing any new tools or patterns to wider teams. #software #programming #frontend
120
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/04/2025
The first thing I do when I want to familiarize myself with a new area in a codebase is check out the tests. Tests are a great form of documentation. #frontend #software #programming
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 02/04/2025
This is really nice for those obvious mistakes, thanks for adding it! My fear though is that junior devs will blindly commit suggestions, even though they may not be correct.
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 01/04/2025
🔥 Want to improve UX on your frontend? Don't make users think. Keep it simple, intuitive, and effortless. The best UX is invisible - it just works. #ux #frontend
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 01/04/2025
I remember you were always so helpful (and still are) over in the discussions tab since the very first day I started using React Query. Especially in the case of thinking about the user experience, not just the technical side of things.
020
Cathal Mac Donnacha @cathalmacdonnacha.com · 31/03/2025
Even though it's been out for years now, I feel like using React Query as an async state manager is a highly underrated and underused feature. tkdodo.eu/blog/react-que… #reactjs #frontend
tkdodo.eu
021
Cathal Mac Donnacha @cathalmacdonnacha.com · 30/03/2025
It's important to have a healthy mindset towards feedback or setbacks. View them as opportunities to improve yourself. Focus on being constructive and solutions-focused rather than emotions-driven. #software #programming
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 28/03/2025
"Writing code in JavaScript feels like skydiving without a parachute"
media.tenor.com
a man in a suit and tie is sitting in a chair with his eyes closed and the word agreed written on his face .
ALT: a man in a suit and tie is sitting in a chair with his eyes closed and the word agreed written on his face .
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 28/03/2025
Starting a "brag document" was one of the best things I did for my career. It saves you a ton of mental effort and scrambling when those performance reviews come around! www.youtube.com/watch?v=gbkv... #software #career
youtube.com
The Easy Way To Document Your Accomplishments
YouTube video by A Life Engineered
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 27/03/2025
Every #reactjs developer should read this: react.dev/learn/you-mi...
react.dev
You Might Not Need an Effect – React
The library for web and native user interfaces
020
Cathal Mac Donnacha @cathalmacdonnacha.com · 27/03/2025
Sometimes I break production on purpose just so our users can appreciate how nice our error page is. 😁 #software #frontend #WebDevelopment
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 26/03/2025
3. Wasted engineering time: Old, unused flags in the codebase can mislead engineers into spending time debugging code that is no longer relevant or in use.
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 26/03/2025
2. Loss of institutional memory: If an engineer responsible for a flag leaves the company, they take the institutional memory of the flag and its feature with them. As time passes, no one knows what the flag does, why it was created, or whether the flag could be retired.
100
Cathal Mac Donnacha @cathalmacdonnacha.com · 26/03/2025
1. Code readability: With hundreds of if-else statements throughout the code, many that were added months or even years ago, the code gets less readable and testable, which slows down the engineering team’s development cadence.
100
Cathal Mac Donnacha @cathalmacdonnacha.com · 26/03/2025
Why it's important to clean up feature flags 👇
100
Cathal Mac Donnacha @cathalmacdonnacha.com · 26/03/2025
Why I don't like Snapshot Testing 👇 - Takes a lot of effort to understand if the failure is expected. - Hard to evaluate if you're even testing your component correctly (compared to specific assertions). - Often blindly updated without checking if it was a legitimate failure.
000
Cathal Mac Donnacha @cathalmacdonnacha.com · 25/03/2025
Just don't show it to the accessibility department 😁
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 14/01/2025
"We'll do that as a fast follow" 😀
130
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/01/2025
Meant to say "followed on BlueSky" 😁.
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/01/2025
"The Staff Engineer's Path" by @whereistanya.bsky.social is a great book for anyone new to technical leadership.
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 05/01/2025
Great tool! I also unfollowed those on Twitter that I've followed on Twitter. Kinda like a checklist. I'm close to deleting my account now as most people are over here.
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 04/01/2025
There's no point looking back, because we're not going that way.
010
Cathal Mac Donnacha @cathalmacdonnacha.com · 04/01/2025
Yep. That way you can eventually close your twitter account and just reference BlueSky whenever you want to look back.
110
Cathal Mac Donnacha @cathalmacdonnacha.com · 28/12/2024
❌ Avoid storing derived state like totals, filters, or counts in useState. ✅ Calculate derived values directly in render from the existing state or props. Simple, clean, and avoids bugs caused by syncing issues! Learn more here: react.dev/learn/you-mi...
Code example showing redundant state along with a better alternative where you simply derive state.
020