shadcn-ui / taxonomy

An open source application built using the new router, server components and everything new in Next.js 13.
https://tx.shadcn.com
MIT License
18.65k stars 2.58k forks source link

Add tanstack query. #46

Open Eduard-Hasa opened 2 years ago

Eduard-Hasa commented 2 years ago

This project is really nice. Ideally any production project is going to need a library like tanstack/react query. Would be really nice if you incorporated it into this project

shadcn commented 2 years ago

Ideally any production project is going to need a library like tanstack/react query.

Yep. I've yet to work on a Next.js app where I did not use react-query.

However, the reason I've not added it (yet) is, the Next team is currently looking into new ways for fetching data, mutating, caching and invalidating in server components.

I want to see how far we can go with just Next before we need react-query.

I'll come back to this when we do.

Eduard-Hasa commented 1 year ago

@shadcn im surprised I dont see custom hooks wrapping tanstack hooks more often to add type safety. I got a pretty cool setup where im using tanstack query at introduced type safety manually instead of using something like trpc and it has worked great for me. Would love to chat about your thoughts on the best approach.

fergiar commented 1 year ago

I would love to see the option to use RQ in this project. I have seen some examples around that show how to set up RQ to work with SSR but I think that at the current state it's just an overhead.