0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework
Ben Younes b8517d3173
docs(vue-query): explain why reactive() is needed for result narrowing (#10580)
The type narrowing example wraps useQuery() in reactive() without saying
why, so destructuring the result directly and then checking isSuccess
looks like it should work (#9244). Spell out that reactive() is what
flattens the refs into one discriminated union, and show the
data.value !== undefined check as the alternative when reactive() is not
an option.

Pin both shapes with type tests: the non-reactive result exposes
Ref<T> | Ref<undefined>, and narrowing on data.value refines the ref
itself.

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
History 2026-08-22 10:20:36 +02:00
..
angular docs: regenerate reference docs to drop redundant TypeDoc page title heading (#11196) 2026-08-16 22:08:19 +09:00
lit docs: regenerate reference docs to drop redundant TypeDoc page title heading (#11196) 2026-08-16 22:08:19 +09:00
preact Preact: update usePrefetchQuery to use new methods with docs (#10669) 2026-08-20 18:35:10 +02:00
react React: update usePrefetchQuery to use new methods, plus react adaptor tests and docs (#10668) 2026-08-20 18:35:32 +02:00
solid chore: update to ts 7 and move cut-off to 5.6 (#11212) 2026-08-17 22:50:18 +02:00
svelte docs(svelte-query/quick-start): Add quick start docs (#11227) 2026-08-18 21:21:21 +02:00
vue docs(vue-query): explain why reactive() is needed for result narrowing (#10580) 2026-08-22 10:20:36 +02:00