Skip to content

feat: using tanstack query for search#1763

Draft
gnugomez wants to merge 1 commit intoeclipse-openvsx:mainfrom
gnugomez:gnugomez/main/tanstack-query-poc
Draft

feat: using tanstack query for search#1763
gnugomez wants to merge 1 commit intoeclipse-openvsx:mainfrom
gnugomez:gnugomez/main/tanstack-query-poc

Conversation

@gnugomez
Copy link
Copy Markdown
Member

@gnugomez gnugomez commented Apr 15, 2026

Relates to #1764

@netomi
Copy link
Copy Markdown
Contributor

netomi commented Apr 30, 2026

the changes look very promising, the question I have is about using tanstack. I understand that this is a powerful framework but we should discuss whether we want to buy into that or look at alternatives. I found https://tanstack.com/start/v0/docs/framework/react/start-vs-nextjs

@gnugomez
Copy link
Copy Markdown
Member Author

@netomi that's a fair concern..

I looked at the article and I think there is an important distinction to make: TanStack Start is their full-stack framework (their answer to Next.js), not TanStack Query. Those are two separate things in the TanStack ecosystem.

The proposal is only to use TanStack Query, which is a much smaller commitment. It was originally called React Query and was renamed when it expanded to support other frameworks like Vue and Solid. It has been around for years and is one of the most adopted libraries in the React ecosystem.

It has no opinion about routing or build tooling, and both Next.js and TanStack Start work with TanStack Query, not instead of it.

On the "buying in" concern: every option requires buying into something. SWR is also a third-party library. Custom hooks means we own the maintenance. TanStack Query's footprint is small: it wraps around our existing ExtensionRegistryService and can be adopted one hook at a time. If we ever needed to remove it, each query would just go back to a useEffect + useState block.

One thing also worth mentioning is the devtools it ships with. You get a floating panel that shows every request, its status, and what is cached. That alone would help us catch the duplicate request problems we have today and make it much easier to debug data fetching issues going forward.

@netomi
Copy link
Copy Markdown
Contributor

netomi commented Apr 30, 2026

ty, that makes sense, the library also has a very small set of dependencies, I was just wondering if there are alternatives to tanstack but from your description it sounds like that it's the stuff we want.

@gnugomez
Copy link
Copy Markdown
Member Author

yep, SWR is the main alternative but TanStack Query has a higher feature ceiling and the devtools tip the balance for our case imo

@gnugomez gnugomez force-pushed the gnugomez/main/tanstack-query-poc branch from fc74155 to b93788d Compare April 30, 2026 09:19
@netomi
Copy link
Copy Markdown
Contributor

netomi commented Apr 30, 2026

with SWR you mean that: https://swr.vercel.app/?

@gnugomez
Copy link
Copy Markdown
Member Author

@netomi yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants