TkDodo's blog

https://tkdodo.eu/blog

A technical blog about frontend-development, TypeScript and React

フィード

記事のアイキャッチ画像
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.
1ヶ月前
記事のアイキャッチ画像
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 ... ?
3ヶ月前
記事のアイキャッチ画像
The Query Options API
TkDodo's blog
v5 brought a new, powerful API, especially if you're using React Query with TypeScript...
4ヶ月前
記事のアイキャッチ画像
2023 in Review
TkDodo's blog
A retrospective on what has happened for me in 2023
5ヶ月前
記事のアイキャッチ画像
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...
6ヶ月前
記事のアイキャッチ画像
The Uphill Battle of Memoization
TkDodo's blog
Exploring why React.memo shouldn't be your first choice for performance optimizations
8ヶ月前
記事のアイキャッチ画像
Array Types in TypeScript
TkDodo's blog
is string[] really better than Array? Of course not!
9ヶ月前
記事のアイキャッチ画像
React Query and React Context
TkDodo's blog
Can it make sense to combine React Query with React Context ? Yes, sometimes ...
10ヶ月前
記事のアイキャッチ画像
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.
1年前
記事のアイキャッチ画像
OSS Feature Decision Tree
TkDodo's blog
An outline of the questions I try to ask myself before adding new features
1年前
記事のアイキャッチ画像
Why React isn't dying
TkDodo's blog
Finishing my train of thought about why React is here to stay (for now).
1年前
記事のアイキャッチ画像
Type-safe React Query
TkDodo's blog
About the difference between "having types" and "being type-safe"...
1年前
記事のアイキャッチ画像
2022 in Review
TkDodo's blog
A retrospective on what has happened for me in 2022
1年前
記事のアイキャッチ画像
Inside React Query
TkDodo's blog
Taking a look under the hood of React Query
1年前
記事のアイキャッチ画像
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年前
記事のアイキャッチ画像
Refactor impactfully
TkDodo's blog
Why not every refactoring is worth doing...
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年前
記事のアイキャッチ画像
React Query FAQs
TkDodo's blog
Answering the most frequently asked React Query questions
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 ...
2年前
記事のアイキャッチ画像
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.
2年前
記事のアイキャッチ画像
Use Urgency
TkDodo's blog
Getting huge refactorings going is not an easy task, but urgency can help here.
2年前
記事のアイキャッチ画像
optional vs. undefined
TkDodo's blog
There is a subtle difference between optional fields and required, but potentially undefined ones.
2年前
記事のアイキャッチ画像
Offline React Query
TkDodo's blog
A glimpse at what v4 will bring for offline queries
2年前
記事のアイキャッチ画像
Always provide customer value
TkDodo's blog
Finding the right spot for doing a refactoring can be tricky
2年前
記事のアイキャッチ画像
Road to Refactoring
TkDodo's blog
A blogpost series about patterns that have helped me succeed with refactorings
2年前
記事のアイキャッチ画像
2021 in Review
TkDodo's blog
A retrospective on what has happened for me in 2021
2年前
記事のアイキャッチ画像
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.
2年前
記事のアイキャッチ画像
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年前
記事のアイキャッチ画像
useState vs useReducer
TkDodo's blog
To useState or useReducer, that is the question...
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.
3年前
記事のアイキャッチ画像
How can I ... ?
TkDodo's blog
Asking the right questions is a form of art that needs to be mastered.
3年前
記事のアイキャッチ画像
Testing React Query
TkDodo's blog
Let's take a look at how to efficiently test custom useQuery hooks and components using them.
3年前
記事のアイキャッチ画像
Status Checks in React Query
TkDodo's blog
How the wrong status check order can negatively impact user experience
3年前
記事のアイキャッチ画像
React Query Render Optimizations
TkDodo's blog
An advanced guide to minimize component re-renderings when using React Query
3年前
記事のアイキャッチ画像
useState for one-time initializations
TkDodo's blog
Why you shouldn't rely on useMemo for guaranteed referential stability but prefer useState instead
3年前
記事のアイキャッチ画像
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
3年前
記事のアイキャッチ画像
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!
3年前
記事のアイキャッチ画像
Things to know about useState
TkDodo's blog
5 things everyone needs to know about useState
3年前
記事のアイキャッチ画像
Simplifying useEffect
TkDodo's blog
useEffect hooks can be hard to reason about, but I have 5 principles that can help to manage them
3年前
記事のアイキャッチ画像
Flow to TypeScript migration journey
TkDodo's blog
How we migrated over 100k lines of code from Flow to TypeScript. A Journey.
3年前
記事のアイキャッチ画像
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.
3年前
記事のアイキャッチ画像
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年前