Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is RTK-Query compatible with Nextjs App Router? #3585

Closed
niralivasoya opened this issue Jul 7, 2023 · 5 comments
Closed

Is RTK-Query compatible with Nextjs App Router? #3585

niralivasoya opened this issue Jul 7, 2023 · 5 comments

Comments

@niralivasoya
Copy link

Greetings!

I am planning to use the latest version of Nextjs 13 (app router) along with Next-auth for authentication. Can someone please assist me in choosing a compatible library for Nextjs 13?

I have listed the libraries that are currently I am planning to use in my project. Kindly let me know if any correction is required or if you have any suggestions for improvement.

Framework: Nextjs 13 App router
Authentication: Next-auth
UI Library: Material UI
Form handling: react-hook-forms
Form validation: Yup
State Management: Redux-toolkit
Data-fetching: RTK Query
Database: Mongodb

I would greatly appreciate it if you could guide me on whether to use RTK Query for data-fetching or if Nextjs already simplifies it by default.

Thank you.

@niralivasoya
Copy link
Author

@markerikson @phryneas can you please guide me in the above matter?

@phryneas
Copy link
Member

phryneas commented Jul 7, 2023

At this point in time, there is no support for React Server Components in Redux.

If you want to use data fetching in client components, RTKQ might still make sense for you. If you have mostly static data and feel like you have the capacity to learn the complexities of server components, you probably want to fetch data in those by using fetch directly.

@rezzak-allcode
Copy link

If I used RTK Query with Nextjs, is it impact for SEO ?

@msutkowski
Copy link
Member

If I used RTK Query with Nextjs, is it impact for SEO ?

That's a pretty broad question that ultimately doesn't matter to the topic here. Nextjs and RTK Query in regards to SEO aren't directly related - if you're using Next, follow their best practices. If you're doing client side data fetching as mentioned, there are different concerns that are outside of the scope of this issue. Your SEO mechanisms in general fall way outside of what RTKQ is designed to do :)

@hmfarid88
Copy link

If you dicide to use Next.js 13 or above don't need RTKQ because fetching and catching tool of Next.js is enough for this purpose but RTKQ is needed for native application

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants