TkDodo's blog
https://tkdodo.eu/blog
A technical blog about frontend-development, TypeScript and React
フィード
React Query API Design - Lessons Learned
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.
25日前
Component Composition is great btw
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.
2ヶ月前
How Infinite Queries work
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 ...
2ヶ月前
Introducing XState Store
TkDodo's blog
There's a new state manager in the game, and it ticks all my boxes ...
4ヶ月前
Please Stop Using Barrel Files
TkDodo's blog
Why you probably shouldn't be adding index.ts files everywhere
4ヶ月前
React 19 and Suspense - A Drama in 3 Acts
TkDodo's blog
React 19 is a very promising release - but there's something not quite right yet with suspense...
5ヶ月前
Automatic Query Invalidation after Mutations
TkDodo's blog
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.
6ヶ月前
Zustand and React Context
TkDodo's blog
Zustand stores a global and don't need React Context - but sometimes, it makes sense to combine them regardless.
7ヶ月前
Avoiding Hydration Mismatches with useSyncExternalStore
TkDodo's blog
Avoiding hydration mismatches can usually be done in two ways - suppressing the warning or spawning an effect. But is there a third option ... ?
9ヶ月前
The Query Options API
TkDodo's blog
v5 brought a new, powerful API, especially if you're using React Query with TypeScript...
10ヶ月前
Why You Want React Query
TkDodo's blog
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...
1年前
The Uphill Battle of Memoization
TkDodo's blog
Exploring why React.memo shouldn't be your first choice for performance optimizations
1年前
React Query and React Context
TkDodo's blog
Can it make sense to combine React Query with React Context ? Yes, sometimes ...
1年前
Thinking in React Query
TkDodo's blog
In this talk, we will learn how a different mindset can help us understand React Query and work with it efficiently.
1年前
You Might Not Need React Query
TkDodo's blog
React Query is a great library, but like any tool, you should choose it for the right problem
1年前
Breaking React Query's API on purpose
TkDodo's blog
Why good API design matters, even if it means breaking existing APIs in the face of resistance.
2年前
OSS Feature Decision Tree
TkDodo's blog
An outline of the questions I try to ask myself before adding new features
2年前
Why React isn't dying
TkDodo's blog
Finishing my train of thought about why React is here to stay (for now).
2年前
Type-safe React Query
TkDodo's blog
About the difference between "having types" and "being type-safe"...
2年前
Working with Zustand
TkDodo's blog
Let's dive into some tips for working with Zustand - one of my favourite client state management libraries in React.
2年前
Seeding the Query Cache
TkDodo's blog
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.
2年前
Refs, Events and Escape Hatches
TkDodo's blog
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...
2年前
React Query meets React Router
TkDodo's blog
React Query and React Router are a match made in heaven.
2年前
Avoiding useEffect with callback refs
TkDodo's blog
Interacting with DOM nodes doesn't necessarily need useEffect
2年前
Hooks, Dependencies and Stale Closures
TkDodo's blog
Let's demystify what stale closures are in combination with react hooks with the help of the analogy of taking a photo ...
3年前
React Query and Forms
TkDodo's blog
Forms tend to blur the line between server and client state, so let's see how that plays together with React Query.
3年前
Use Urgency
TkDodo's blog
Getting huge refactorings going is not an easy task, but urgency can help here.
3年前
optional vs. undefined
TkDodo's blog
There is a subtle difference between optional fields and required, but potentially undefined ones.
3年前
Always provide customer value
TkDodo's blog
Finding the right spot for doing a refactoring can be tricky
3年前
Road to Refactoring
TkDodo's blog
A blogpost series about patterns that have helped me succeed with refactorings
3年前
Beware the leaking any
TkDodo's blog
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.
3年前
Leveraging the Query Function Context
TkDodo's blog
Use what React Query provides for optimal type safety
3年前
Mastering Mutations in React Query
TkDodo's blog
Learn all about the concept of performing side effects on the server with React Query.
3年前
React Query Error Handling
TkDodo's blog
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..."
3年前
React Query as a State Manager
TkDodo's blog
Everything you need to know to make React Query your single source of truth state manager for your async state
3年前
Placeholder and Initial Data in React Query
TkDodo's blog
Learn about the different possibilities to avoid loading spinners in React Query.
3年前
About async functions
TkDodo's blog
A deep dive into async functions and how they are different from promise chaining
3年前
Effective React Query Keys
TkDodo's blog
Learn how to structure React Query Keys effectively as your App grows
3年前
Using WebSockets with React Query
TkDodo's blog
A step-by-step guide on how to make real-time notifications work with react-query
3年前
React Query and TypeScript
TkDodo's blog
Combine two of the most powerful tools for React Apps to produce great user experience, developer experience and type safety.
4年前
How can I ... ?
TkDodo's blog
Asking the right questions is a form of art that needs to be mastered.
4年前
Testing React Query
TkDodo's blog
Let's take a look at how to efficiently test custom useQuery hooks and components using them.
4年前
Status Checks in React Query
TkDodo's blog
How the wrong status check order can negatively impact user experience
4年前
React Query Render Optimizations
TkDodo's blog
An advanced guide to minimize component re-renderings when using React Query
4年前
useState for one-time initializations
TkDodo's blog
Why you shouldn't rely on useMemo for guaranteed referential stability but prefer useState instead
4年前
React Query Data Transformations
TkDodo's blog
Learn the possibilities to perform the quite common and important task of transforming your data with react-query
4年前
No love for boolean parameters
TkDodo's blog
Innocent looking boolean parameters, or flags, are often the reason for hard to maintain legacy code. Resist the urge of adding them!
4年前
Simplifying useEffect
TkDodo's blog
useEffect hooks can be hard to reason about, but I have 5 principles that can help to manage them
4年前
Flow to TypeScript migration journey
TkDodo's blog
How we migrated over 100k lines of code from Flow to TypeScript. A Journey.
4年前
On naming things
TkDodo's blog
Naming is hard. Naming is subjective. Yet there are some things we can objectively do when it comes to finding proper names.
4年前
Practical React Query
TkDodo's blog
Let me share with you the experiences I have made lately with React Query. Fetching data in React has never been this delightful...
4年前
Avoiding legacy systems
TkDodo's blog
Every software will eventually become a nightmare to maintain, unless we actively do something about it.
4年前
Putting props to useState
TkDodo's blog
Part deux of the useState pitfalls series is here, showing patterns to help solve the common use-case of initializing state with a prop.
4年前
The power of const assertions
TkDodo's blog
const assertions are a criminally underused TypeScript feature - learn all about them here, now
4年前
Pedantic index signatures in TypeScript 4.1
TkDodo's blog
Accessing objects and arrays has never been safe in TypeScript, but this is about to change ...
4年前
Why I don't like reduce
TkDodo's blog
If you know me, you know I'm no fan of Array.reduce. I'll explain why in detail in this post.
4年前
Calling JavaScript from TypeScript
TkDodo's blog
Gradually migrating from JS to TS is not without difficulties - here are some tricks to smoothen the interoperability
4年前
Solving conflicts in package-lock.json
TkDodo's blog
Why you should never delete package-lock.json and how npm can solve the conflicts for you
4年前
Don't over useState
TkDodo's blog
The first part of the useState pitfalls series is all about avoiding state altogether. Lots of things might not even be state after all...
4年前