Typescript, React Query, and Startups! cover

Curated by Alec Johnson

Typescript, React Query, and Startups!

3 Months ago I started working at my first real startup. At the time the company was 4 people, and there were zero full time frontend engineers. I've never had so much control over the direction of a codebase before, and it was difficult, at first, to weigh the pros and cons of learning the existing libraries the team had been using vs moving to ones I was more comfortable with.

One of the most impactful decisions I made was that we were going to move to Tanstack (React) Query, leaving behind the existing fetching implementation in Vercel's SWR. This is a collection of some of the most useful blog posts and guides that I used in order to orchestrate a complete migration from SWR to React Query in a week, the kind of thing that would take months (or not even be possible) at a large company. From stronger types on the errors and return values, to a much simpler configuration on cache invalidation, I have zero regrets!