Profile avatar
cathalmacdonnacha.com
Principal Frontend Engineer @wpengine. Follow along for frontend tips on React βš›οΈ Testing πŸ§ͺ UI/UX πŸ–₯. My blog ✍️ http://cathalmacdonnacha.com
83 posts 74 followers 168 following
Regular Contributor
Active Commenter

"The Staff Engineer's Path" by @whereistanya.bsky.social is a great book for anyone new to technical leadership.

There's no point looking back, because we're not going that way.

❌ 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...

Claude 3.5 Sonnet, directly in VS Code. Available to everyone today with GitHub Copilot Free. Learn more: aka.ms/copilot-free

Introducing new tools or patterns? βœ… Focus on persuading a few key advocates rather than convincing absolutely everyone. A few believers can spark wider adoption far more effectively. #software #webdev #frontend

πŸ”₯ For actions that require sign in, avoid having a user perform the same action twice. 1. User clicks the like button on a comment. 2. User is asked to sign in. 3. User signs in successfully. βœ… Result: Comment should be displayed again and liked. #ux #webdev #frontend

βœ… It's a good idea to set focus to the first input field when loading a page or popup modal. ❓Is there any reason you wouldn't want to? #ux #frontend

πŸ’» Being able to communicate technical information to a non-technical audience is such an underrated skill. ❓Have you had to do this in the past? #software

I’ve found the fewer environments a software team has the better. Every additional environment adds cost, management overhead, out of sync risk, and delays deployment. My ideal? Just two environments - Dev and prod. Merge to main auto deploys. Feature flag as needed. πŸ”₯

πŸŽ„Have some fun with your mock/test data. Instead of "TestUser1", "TestUser2", pick some characters from your favourite TV shows. Omar Little and Saul Goodman often make an appearance in my tests. 😁 #frontend #software #webdev

Next.js and Remix's focus on SSR has added cruft and complexity to the core React use case of building interactive apps. @tanstack.com is the antidote to this: an opinionated framework that actually helps you get stuff done rather than forcing you to optimise for someone else's e-commerce use case.

How am I just now discovering "Design Mode" in Chrome DevTools? ⭐️ πŸ’» #ChromDevTools #frontend #webdev

Using TanStack Query's 'Optimistic Updates' pattern is one of the best ways to improve the UX. πŸš€ Just make sure it's the right fit: βœ… Great for scenarios with high success likelihood (e.g. likes, toggles). ❌ Avoid for critical, high-risk actions or long flows (e.g. payments, irreversible changes).

Ever wondered when you should adopt a new CSS feature? Read this πŸ‘‡

Just updated all of my articles πŸ¦‹ πŸ˜€

I'm surprised to see how often "data-testid" is still used. I find it much more beneficial to avoid implementation details like that, and to focus on testing user interactions and elements users can actually see on screen. #frontend #webdev #testing

Having solid ESLint and Prettier rules is one of the best ways to avoid nitpicks during PRs and keep consistent patterns across your project. #webdev #frontend

The #1 best state manager in 2024 is...the URL. 😁 It's simple, it's global, and can be accessed from anywhere. #webdev #frontend

Typescript highlighted a really dumb mistake I made recently and I just thought to myself how many hours I could have potentially wasted trying to debug it.

One thing I hear often is "how do we test our app in all languages/ translations?" βœ… Recommendation: Just test with the default language. It's a good idea to test that changing a language does actually apply translations, but outside of that I don't think it's worth the time investment. #webdev

Want to improve the UX on your frontend? Don't make users think. Keep interfaces simple, intuitive, and free of unnecessary complexity. Great UX is about making the user's journey effortless and enjoyable. #frontend #userexperience #uxdesign #webdev

Complex tests are often a symptom of complex solutions. #software #programming #webdev

Before I begin any refactoring in a new area, 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 #webdev

This is the best feed πŸ‘‡ Posts from people you follow without reposts and replies.

πŸ›Every time you fix a bug, you should be writing a test for it so that it doesn't reoccur. #software #programming #webdev