Maintaining TanStack Query โข blog at tkdodo.eu โข Software Engineer @getsentry โข ReactJs โข TypeScript โข ๐ฆ๐น Vienna, Austria โข Father of two ๐งโ๐ฆ
๐ข I'm so stoked to announce that today, ๐ฎ query.gg - the brand new, official @tan_stack React Query course - is live and available for everyone ๐
components / hooks / types / utils (and constants) is the split I'm seeing in many codebases, yet it's the one I dislike the most. It groups by type, not by domain. "useTheme" will live next to "useTodo", but not next to ThemeProvider ... why?
Let's play: "You Might Not Need this Effect". It's a game where you show me some code where you use useEffect, and I'll try to find a way to remove it.
Hit me ๐ค
๐คฏ Oh wow, ChatGPT really uses @tan_stack React Query. Absolutely amazing to think about about how many people are interacting with code Iโve written
๐ข Yesterday, we released an experimental react-query-nextjs package for the app directory. Wrap your app in the <ReactQueryStreamedHydration> component to enjoy direct useQuery fetches on the server with suspense, which streams to the client ๐
Example: tanstack.com/query/v5/docs/โฆ
PSA: Whenever you think of writing useEffect, the only sane thing is to NOT do it. Instead, go to the react docs and re-read the page about why you don't need an effect. You really don't.
But what if I ne.. - NO. read the page!
In my specia.. - NO. read the page!
READ THE PAGE
Is there a GitHub Action that will just run prettier on the whole repo and commit the changes to the PR?
I'm so tired of the feedback loop where prettier fails on PRs. We even have a pre-commit hook to validate but it's not helping. It's insane how much time is wasted here ...
โค๏ธ I've talked a lot about how I love zustand - I've been using it quite extensively over the last 3 years.
๐ This is the beginning of a series I've planned on "working with zustand". The intro is a bit basic, I want to go deeper in the future:
My wife just told me that a website to buy tickets doesn't work. Turns out she was just clicking the button before JS has finished hydrating so it did nothing ๐. Thanks, SSR...