How to use derived state in React to keep client state and server data aligned without manual sync or effects.| tkdodo.eu
How to get the most out of select, sprinkled with some TypeScript tips.| tkdodo.eu
Yes, it's type-safe, but there's so much more to love about TanStack Router.| TkDodo's blog
How to build optimistic UI that is resilient to race conditions, even when multiple mutations update the same entity concurrently.| tkdodo.eu
A retrospective on what has happened for me in 2024| TkDodo's blog
In this talk, maintainer Dominik will explore the other side—the less favorable aspects of React Query and situations where it may not be the best fit. No library is perfect; every choice involves trade-offs. By the end of this talk, you'll have a better understanding of React Query's limitations and why it remains a compelling choice despite them.| TkDodo's blog
Reflecting on useCallback, how the Compiler changed my thinking about it, and what React 19 has in store for Ref Callbacks...| TkDodo's blog
A brief reflection on the platform and how I plan to continue with it...| TkDodo's blog
In this talk, React Query maintainer Dominik will walk us through some of the API design choices that were made in React Query to get to that DX. You'll hear stories about things that went well, but also about tradeoffs and mistakes that were made, and what lessons we can all learn from those.| TkDodo's blog
Component composition is one of the best parts of React, and I think we should take more time to break our components into manageable parts before littering one component with conditional renderings.| TkDodo's blog
A serious bug report about infinite queries led me to question it's architecture, but it all turned out fine in the end ...| TkDodo's blog
There's a new state manager in the game, and it ticks all my boxes ...| TkDodo's blog
Why you probably shouldn't be adding index.ts files everywhere| tkdodo.eu
React 19 is a very promising release - but there's something not quite right yet with suspense...| tkdodo.eu
Even though there is nothing built into React Query, it doesn't need a lot of code to implement automatic query invalidation in user-land thanks to the global cache callbacks.| tkdodo.eu
Zustand stores a global and don't need React Context - but sometimes, it makes sense to combine them regardless.| tkdodo.eu
Avoiding hydration mismatches can usually be done in two ways - suppressing the warning or spawning an effect. But is there a third option ... ?| tkdodo.eu
v5 brought a new, powerful API, especially if you're using React Query with TypeScript...| tkdodo.eu
Let's take a look at why you'd want a library like React Query, even if you don't need all the extra features it provides...| tkdodo.eu
Exploring why React.memo shouldn't be your first choice for performance optimizations| tkdodo.eu
React Query is a great library, but like any tool, you should choose it for the right problem| tkdodo.eu
Refs can provide a way to sidestep dependency arrays without violating any rules, and the proposed useEvent hook might make working with functions and effects a lot easier...| tkdodo.eu
is string[] really better than Array? Of course not!| tkdodo.eu
Can it make sense to combine React Query with React Context ? Yes, sometimes ...| tkdodo.eu
How the wrong status check order can negatively impact user experience| tkdodo.eu
Why good API design matters, even if it means breaking existing APIs in the face of resistance.| tkdodo.eu
In this talk, we will learn how a different mindset can help us understand React Query and work with it efficiently.| tkdodo.eu
An outline of the questions I try to ask myself before adding new features| tkdodo.eu
Finishing my train of thought about why React is here to stay (for now).| tkdodo.eu
With suspense for data fetching on the horizon, it is now more important than ever to make sure your cache is seeded properly to avoid fetch waterfalls.| tkdodo.eu
React Query and React Router are a match made in heaven.| tkdodo.eu
Interacting with DOM nodes doesn't necessarily need useEffect| tkdodo.eu
Answering the most frequently asked React Query questions| tkdodo.eu
Let's demystify what stale closures are in combination with react hooks with the help of the analogy of taking a photo ...| tkdodo.eu
Forms tend to blur the line between server and client state, so let's see how that plays together with React Query.| tkdodo.eu
Getting huge refactorings going is not an easy task, but urgency can help here.| tkdodo.eu
There is a subtle difference between optional fields and required, but potentially undefined ones.| tkdodo.eu
Finding the right spot for doing a refactoring can be tricky| tkdodo.eu
A blogpost series about patterns that have helped me succeed with refactorings| tkdodo.eu
Any is not among my favourite TypeScript types, but it is the one you will inevitably encounter. Let's see what makes it so dangerous.| tkdodo.eu
Use what React Query provides for optimal type safety| tkdodo.eu
Learn all about the concept of performing side effects on the server with React Query.| tkdodo.eu
To useState or useReducer, that is the question...| tkdodo.eu
After covering the sunshine cases of data fetching, it's time to look at situations where things don't go as planned and "Something went wrong..."| tkdodo.eu
Everything you need to know to make React Query your single source of truth state manager for your async state| tkdodo.eu
Learn about the different possibilities to avoid loading spinners in React Query.| tkdodo.eu
A deep dive into async functions and how they are different from promise chaining| tkdodo.eu
Learn how to structure React Query Keys effectively as your App grows| tkdodo.eu
A step-by-step guide on how to make real-time notifications work with react-query| tkdodo.eu
Combine two of the most powerful tools for React Apps to produce great user experience, developer experience and type safety.| tkdodo.eu
Asking the right questions is a form of art that needs to be mastered.| tkdodo.eu
Let's take a look at how to efficiently test custom useQuery hooks and components using them.| tkdodo.eu
An advanced guide to minimize component re-renderings when using React Query| tkdodo.eu
Why you shouldn't rely on useMemo for guaranteed referential stability but prefer useState instead| tkdodo.eu
Learn the possibilities to perform the quite common and important task of transforming your data with react-query| tkdodo.eu
Innocent looking boolean parameters, or flags, are often the reason for hard to maintain legacy code. Resist the urge of adding them!| tkdodo.eu
5 things everyone needs to know about useState| tkdodo.eu
useEffect hooks can be hard to reason about, but I have 5 principles that can help to manage them| tkdodo.eu
How we migrated over 100k lines of code from Flow to TypeScript. A Journey.| tkdodo.eu
Naming is hard. Naming is subjective. Yet there are some things we can objectively do when it comes to finding proper names.| tkdodo.eu
Let me share with you the experiences I have made lately with React Query. Fetching data in React has never been this delightful...| tkdodo.eu
Every software will eventually become a nightmare to maintain, unless we actively do something about it.| tkdodo.eu
Part deux of the useState pitfalls series is here, showing patterns to help solve the common use-case of initializing state with a prop.| tkdodo.eu
const assertions are a criminally underused TypeScript feature - learn all about them here, now| tkdodo.eu
Accessing objects and arrays has never been safe in TypeScript, but this is about to change ...| tkdodo.eu
If you know me, you know I'm no fan of Array.reduce. I'll explain why in detail in this post.| tkdodo.eu
Gradually migrating from JS to TS is not without difficulties - here are some tricks to smoothen the interoperability| tkdodo.eu
Why you should never delete package-lock.json and how npm can solve the conflicts for you| tkdodo.eu
The first part of the useState pitfalls series is all about avoiding state altogether. Lots of things might not even be state after all...| tkdodo.eu
Last Update: 2022-04-23 It is already well known in the frontend development community that adopting TypeScript is a good idea for (almost…| tkdodo.eu
Let's dive into some tips for working with Zustand - one of my favourite client state management libraries in React.| tkdodo.eu
About the difference between "having types" and "being type-safe"...| tkdodo.eu