Skip to content
TkDodo's blog

2022 in Review

Dec 31, 2022 — Personal, 2022, Year in Review
2022 in Review
Photo by zero take

2022 has been quite a wild ride for me, so let me share the high (and low) points of the year with you:

React Summit 2022

I went to my first ever in-person tech conference this year, React Summit (opens in a new window). It was an overall great experience, as we combined the conference with a bit of sightseeing in Amsterdam. We even got super lucky and got tickets to the anne frank house (opens in a new window) - an attraction that is usually sold out for months in advance.

My personal highlight of the conference has to be that I got to meet Tanner Linsley (opens in a new window) in person for the first time. Having worked with him virtually for over one year, it was great to finally meet him.

Avatar for Dominik 🔮
Dominik 🔮
@TkDodo

And finally, I met up with the one and only @tannerlinsley 🎉

Tanner and me

- Jun 17, 2022

Also, his talk 5 Years of Building React Table (opens in a new window) was one of the most energetic and entertaining talks I have ever seen. Make sure to watch it if you haven’t had the chance yet.

React Query v4

I was really excited about the v4 release, which is also why I was so disappointed when we finally released it. For me, it was a personal disaster at the time (It’s better now, I’m quite happy with it). To understand why, we have to take a step back:

Background

We’ve started working on v4 in late 2021. There were some issues (opens in a new window) around offline mode that we couldn’t fix without introducing breaking changes, so we’ve bundled everything together that has amassed ove the last year or so to release a new major version.

At the same time, we had a separate branch (opens in a new window) that was migrating over to React 18 useSyncExternalStore (opens in a new window). We could’ve added this in a minor version, because it only changes internal things, but it felt safer to me to bundle it with the breaking changes.

I was pretty confident that the timelines would align and that we would be able to release v4 shortly after React 18 becomes “officially stable”.

v4 beta

React 18.0.0 was released on March 29th (opens in a new window), and we shipped the first beta of v4 on April 2nd (opens in a new window). At this time, I was hoping for lots of adoption and feedback from the community. I’m really thankful for everyone who tried out the beta version, and feedback was mostly positive.

We got some bug reports around React Native (thanks to Hirbod (opens in a new window)) and started to add ESM compliant bundling (opens in a new window) (thanks to Sachin (opens in a new window) for this contribution).

v3 and React 18

v3 does not support React 18. Not really. There’s no support for concurrent features because it doesn’t use useSyncExternalStore. I tried to explain this, repeatedly.

Still, lots of issues and even PRs were opened that wanted to update our peerDependency on React to ^18.0.0. I closed them on sight, because I didn’t want to give people the wrong impression that v3 would work with React 18.

I don’t really remember what drove me over the edge, but it’s likely it was some sort of entitled comment somewhere on the internet. 😅 I gave in and released v3.35.0 (opens in a new window) with a somewhat angry release note. Give the people what they want…

Last minute pivot

Just before we were ready to release v4, and about one week before ReactSummit, we decided to only release React Query v4 as @tanstack/react-query, with everything that goes with it:

I dug up the original Discord conversation:

TkDodo can also just do @tanstack/react-query? v4 is breaking anyways :) Tanner: That's true

We wanted to get it ready before ReactSummit so that Tanner could announce v4 on stage, but it just wasn’t enough time. We announced it anyway, and said that it would be ready within 30 days.

The release

We managed to stick to that timeline, and v4.0.0 was released on July 18th (opens in a new window). 🚀

Avatar for Tanner Linsley
Tanner Linsley
@tannerlinsley

🎉🥳 Announcing TanStack Query v4!

🪪 Name Change!

🌎 Framework Agnostic!

✅ @reactjs 🚧 @vuejs 🔜 @solid_js @sveltejs

🔀 Concurrent React Support

🏕 Offline + Network Mode

💾 Stable Persisters

⚡️ Tracked Queries Default / Perf+

📚 New Docs!

🙏 @TkDodo

- Jul 20, 2022

But to be honest, the release wasn’t very stable. To be quite frank, everything below 4.3.0 is nigh unusable. The monorepo and bundling changes that went with it introduced many things I didn’t anticipate. Devtools were included in prod builds for some bundlers, and all the ESM changes were basically lost during the move. Version 4.0.0 didn’t even have types published. 🙈

To add to the confusion, we accidentally released 4.0.0 of the react-query package as well. This is also what Theo (opens in a new window) was struggling with in this video (opens in a new window). It was really messy.

isLoading

I already felt bad about all of this, when on top of that, complaints were coming in about the loading state for disabled queries in v4. I don’t want to go too much into detail, you can read up on this on the GitHub issues (opens in a new window) if you like.

The whole situation was challenging for me personally because a) this was the first time I’ve driven a major release of a popular open-source library and b) it just seemed like I got everything wrong. 😔

I was also disappointed because we had a beta release out for over 6 months, and there was no feedback whatsoever that this API is not ideal for some cases. Mostly though, I was angry at myself because I clearly “missed this” in the API design.

(Plot twist: We thought we need to fix the API in v5, but we likely won’t. It’s trading edge-cases, and it’s fine. I might explain this in more detail in a separate post)

Learnings

There is no better way to learn than to make mistakes. I’ve learned a lot from this experience, and I’m really thankful for everyone who helped me through it. So for v5, I’m going to:

Streaming

Producing content has always been something I like to do, but I’ve generally limited myself to written content so far.

This changed when Jason Lengstorf (opens in a new window) invited me to Learn with Jason (opens in a new window) to talk about TanStack Query. In case you missed the stream, you can watch the recording here (opens in a new window). It was super well received and a lot of fun for me, too. At times during the stream, it really felt like I was just talking to Jason, and I really enjoyed that.

This experience led me to think that I should do more streaming, so I’ve taken the opportunity to set up a twitch account (opens in a new window) and already published a first two-hour stream of me working on a feature for TanStack Query v5. You can watch the recording on YouTube (opens in a new window). I’m happy that people like this form of my content as well, and I’m looking forward to doing more of it next year.

Other online appearances

I’ve further been on:

I’ve also more than quadrupled my twitter account (opens in a new window) this year, which is still astonishing to me, as I’m not doing anything different than last year. I guess the bigger you already are, the easier it is to gain new followers. I’m glad that I am doing this by hopefully providing valuable content that people like to read (and watch (opens in a new window)). 😄️

Rewriting my blog

Yeah, that didn’t happen, and it’s also not going to happen. 😂 I’ve got better things to do, and the blog runs just fine. I’d rather add more content than rewrite the whole thing.

Looking at the numbers for 2022 (stats are public (opens in a new window)), my articles have been read over 1 million times, which is just crazy:

Unique visitors: 569k(+558%), Total page views: 1.1M(+700%)

Again, this shows that people are interested in the content I’m producing, and I’m really happy about that. 😊

2023

I’m sure 2023 will have some exciting things in store for me. I’m aware that I am incredibly lucky to be where I am right now. I’m also trying to create luck for myself by “doing and telling”. If that doesn’t mean anything to you, make sure to read this great blog post by swyx (opens in a new window) about how to create luck (opens in a new window). It’s from 2020, but I’ve only just read it sometime this year.

History has shown that I’m bad at predicting the future, so I’m not trying to do that. I’m just going to keep doing what I’m doing, and see where it takes me. Happy new year!


That’s it for today. Feel free to reach out to me on bluesky (opens in a new window) if you have any questions, or just leave a comment below. ⬇️

Like the monospace font in the code blocks?

Check out monolisa.dev

Bytes - the JavaScript Newsletter that doesn't suck