Tags: uidotdev/react-query
Tags
fix(devtools): add code element's background (TanStack#3287) Prevent code element's backround from being overwritten
feat: Bail out if query data undefined (TanStack#3271) * Bail out if query data undefined * Fix failing test * docs: migration guide for undefined data * docs: update setQueryData reference * Update docs/src/pages/guides/migrating-to-react-query-4.md Co-authored-by: Louis Law <louiscklaw@users.noreply.github.com> Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
fix(types): export QueriesOptions and QueriesResults types for useQue… …ries (TanStack#3251) * refactor(useQueries) export QueriesOptions type export the QueriesOptions type closes TanStack#3250 * refactor(useQueries): add export to index Add the export of the QueriesOptions type to the index file * refactor(useQueries) export QueriesResults type Export QueriesResults type Co-authored-by: Jeffrey Sims <jeffreysims@Jeffrey-Sims-Mac.local>
fix(core): do not refetch disabled queries (TanStack#3223) * fix(core): do not refetch disabled queries with refetchQueries or invalidateQueries + refetchType "inactive" disabled queries (=queries that have observers which are all enabled:false) are matched as "inactive"; this is okay when searching for them via findAll or for removeQueries, but the docs clearly state that refetchQueries / invalidateQueries do not refetch disabled queries, and that the only way to refetch them is via refetch returned from useQuery; this is important when using enabled to signal that some dependencies are not yet ready some tests needed to be adapted because we used disabled observer + refetchQueries a lot. The easiest way to emulate the observers we wanted here was mostly with initialData + staleTime, and to get a real inactive query, we just need to subscribe + unsubscribe immediately * fix(core): do not refetch disabled queries add tests for refetchQueries + disabled * fix(core): do not refetch disabled queries update test to make more sense - title said disabled queries, but we had no disabled query; test now does the opposite of what it did before, but that's what this PR does :)
Merge remote-tracking branch 'react-query/master' into alpha # Conflicts: # src/core/notifyManager.ts # src/core/types.ts
fix(core): make sure batching finishes if exception is thrown (TanSta… …ck#3216) incrementing and decrementing transactions need to happen in an atomic operation, no matter what happens in between; if we increment, but never decrement, we will get to a state where transactions can never become zero - we're basically "leaking" an open transaction. This leads to no observers being informed ever again because we think we still have an open transaction this can be fixed by using try/finally to always decrement the transactions
docs(ssr): Hydration caveat for Next.js' rewrites (TanStack#3209) Adds a small section for a caveat about hydration when using some specific feature/configuration of Next.js