Kent C. Dodds 🌌 Profile picture
Improving the world with quality software · Husband, Father, Latter-day Saint, Teacher · https://t.co/pPQmnZS6rR, https://t.co/NYn5aJVGve, https://t.co/U5KafpJTZp
8 subscribers
Jan 26, 2023 5 tweets 2 min read
I'm giving my Advanced React Patterns workshop in Austria for @AgentConf!!

It's completely updated (and in TypeScript‼️) with some newer patterns and others that have stood the test of time.

See you there!

kentcdodds.com/workshops/adva… Kent in a workshop setting ... This workshop will include some valuable patterns that will help you create highly reusable React components that are a delight to work with.

It is advanced, but if you're just getting started on your React journey, I have some great resources to help you get up to speed!
Dec 20, 2022 4 tweets 2 min read
I've heard people complain that ORMs (like @prisma) just get in your way. But you can execute raw queries with Prisma which means it's never in your way. It just helps big time for most things and on *really* complex stuff you're back to the status quo. Here's an example of something I couldn't do with Prisma, so I just used a raw query and continued on my way using Prisma for everything else: github.com/kentcdodds/ken…

It's not like this would've been any easier if I weren't using an ORM for other things 🙃
Aug 15, 2022 6 tweets 1 min read
If my wife did this to me, I'd try so hard not to lose it all. Just thinking of it makes me feel like I'm crawling in my skin. Those wounds would not heal. I'd be so lost without her I'd confuse what is real.
Jun 1, 2022 4 tweets 2 min read
👀 #RenderATL Screenshot of remix-todomvc... Feel free to try it out: remix-todomvc.fly.dev
And check out the code: github.com/kentcdodds/rem…

Excited about this one. Even on a slow network connection the UX of this app is pretty stellar 🔥 And the DX to get that bug-free UX is fantastic.
May 19, 2022 6 tweets 3 min read
Working on the @remix_run Fakebooks app in preparation for the Advanced Remix workshop at #RemixConf. Adding form validation and I am again struck by how much @mjackson and @ryanflorence nailed it with @remix_run. So freaking powerful. Just had another moment like that when implementing the pending UI stuff. (backend arbitrarily slowed to demonstrate this). The code for this is so simple and straightforward. Also shout-out to @meijer_s's npm.im/spin-delay package for avoiding a flash of loading state.
May 18, 2022 4 tweets 1 min read
Just updating dependencies for the first time in a few months... What could possibly go wrong? A TON of dependencies updat... And this isn't even all of them. There are a few that I just decided I didn't have time to manage this time around 😅
Jan 29, 2022 18 tweets 6 min read
Tonight I got t-boned by a guy running a stop sign in a residential area going 80-100 mph. The seatbelt broke my collar bone and the airbags broke my front teeth. The dashboard trapped my feet and knees in the car for 20 minutes while they ripped the top of the car off to get me. Kent in a hospital bed with broken teeth and a broken collar I have surgery in the morning to repair my collar bone. I'm in pain, but not as much as I would expect.

The guy who hit me flipped over and fled the scene. I was told he later came back and was arrested. I guess that means he was physically ok.
Jan 28, 2022 6 tweets 3 min read
If you think that @remix_run is coming for you Next.js users... I mean, we'd love to have you as users of Remix and all, but you're not really our target... Screenshot of https://www.npmtrends.com/react-router-vs-next @remix_run Some people (a minority) are reading *way* too much into this. This isn't a jab at next. This is showing that Remix is an evolution of React Router. It was never about competing with Next, it was always about serving our React Router users better.
Oct 29, 2021 10 tweets 6 min read
Quick interesting story time.

So I use @cloudinary to handle image optimization and transformations on kentcdodds.com (more details: kentcdodds.com/blog/building-…). However, their pricing for bandwidth is outrageously high and with the amount of traffic I get it's... ... just way more than I'm willing to pay.

So I decided that since @Cloudflare is dirt cheap for bandwidth I could put that in front of @cloudinary and save big time. One problem here is that @cloudinary's HTTP cache-control header marks its images as "private" and ...
Oct 6, 2021 7 tweets 2 min read
Pushing this change now. You now have to click the login link with the same device that requested the link or it won't work.

If you want to login with your mobile device but have trouble accessing the link, then you can login on desktop and scan the QR code on your profile :) In case you're interested: github.com/kentcdodds/ken…

Like I said. I originally had this in place, but gave in when people complained about being able to use the login link on a different device. That was the wrong choice.
Aug 11, 2021 15 tweets 8 min read
Don't believe the FUD. @Tesla cars/solar/batteries are the best in the business and only getting better. And they're doing more to reduce climate change than anyone else.

tesla.com/impact-report/… Here, let me save you a click...

FUD says: "EVs aren't *that* much better for the environment than ICE cars when factoring in production of the car and source of the electricity."

This couldn't be more false. Significantly Less Lifecycle Emissions than ICE Vehicles   T
Mar 14, 2021 4 tweets 2 min read
What's amazing to me is that FSD wasn't even close to being able to do this just a few months ago. This is an illustration of the leaps and bounds improvement the FSD rewrite is over what's in my car right now. Imagine where this will be in the next few months. #exponential Every car drives itself any time the driver isn't paying attention. It's totally bonkers to me that we drive around trusting ourselves and other drivers to stay focused on the road.

In 2020, there was a driving related fatality every ~26 seconds. We *need* autonomous driving. A man in the driver's seat ...
Mar 4, 2021 4 tweets 1 min read
I'm getting a LOT of github issues on my projects/workshops involving npm v7... I'm still on v6. Did v7 just mess up a bunch of stuff or something? Just realized that v7 has been out for FIVE months. For some reason I thought it was pretty recent 🙃

I guess I should upgrade and see if I can figure out what's going on with it...
Mar 3, 2021 5 tweets 1 min read
Udemy is a bad company. I wouldn't say this if this were the first time this sort of thing has happened. But this isn't the only thing that makes them terrible. It's one of a list of things.
Dec 14, 2020 4 tweets 2 min read
3 hours... @etrade what the heck.

On hold for three hours. This is ridiculous. Screenshot of phone app showing an ongoing call of being in @etrade I guess this is normal? reddit.com/r/etrade/comme…
Dec 6, 2020 24 tweets 6 min read
Hey folks, just want to remind you of the 40% off deal going on at TestingJavaScript.com. Here's a thread of what some folks have said about it recently:
Apr 18, 2020 6 tweets 2 min read
Tools I love to build web apps with:
React
React Router (v6)
react-query
React/Cypress @TestingLib
Reach UI
@emotioncss
msw
react-error-boundary
@fbjest
@Cypress_io

And a framework like react-scripts or Gatsby or Next.

And that's pretty much the main/common stuff. I just use colocation for state management (that includes composition and sometimes context when necessary). Don't need anything else even in "large enterprise apps." react-query manages server cache/state super well 👍
Dec 29, 2019 15 tweets 5 min read
Ok, so let's talk about this for a second.

First, I apologize for not being more clear in the original question. I did try to clarify in following tweets. I was asking about United States Federal Income Taxes. And it was a bit of a trick question.

(Thread) Before getting into it, I just want to make it clear that I'm not demonizing Amazon for how many taxes they pay. They do pay all the taxes they're legally required to pay. The problem does not lie in Amazon (or all the other big companies this applies to), but in the US tax code.
Dec 26, 2019 6 tweets 2 min read
A company should not require you to work extra hours (I think even a 40 hour work week is too much).

If you want to work *for yourself* on weekends and evenings to level up then sure, do it.

I wouldn't have the freedom I have now without doing that in my 20s. I still do that sometimes, but not nearly as much. I overdid it a bit occasionally (at the expense to my personal health and family). I probably could've made it fine by being more balanced.
Jul 25, 2019 4 tweets 1 min read
This pattern:

test('whatever', () => {
const foo = someThing()
// use foo
})

makes for a WAY simpler testbase than:

let foo
beforeEach(() => {
foo = someThing()
})

test('whatever', () => {
// use foo
})

Avoid mutable variables. Your tests will be easier to understand To be clear, you can see what I recommend in kcd.im/aha-testing
May 24, 2019 8 tweets 4 min read
🚨🚨 PSA (thread)! There's a 40% off sale at egghead.io/pricing!

As you may know, I have hundreds of bite-sized videos on @eggheadio about React, JavaScript, testing, and more. And I'm not alone. There are thousands of videos and tons of courses all about software development, up and down the stack from the best in the business.

And if you're not sure it's worth the money or it's not in your budget, you can try it out at a monthly rate too.