#Which state manager should I use for fetching data, store it and make it reusable with app router?

3 messages · Page 1 of 1 (latest)

brave locust
#

I cannot decide which state manager should I use for fetching data, store it and make it reusable in different parts of the application with app route.

To be more specific:

  1. When the app initial loads (in whatever route), I want NextJS to fetch some data and the store it.
  2. Then from different pages/routes/components (client components) to be able to access that data, mutate it and make it persistent accross routes or invalidate the cache or whatever.

I have experience with Redux Toolkit and RTK Query, Zustand and Tanstack but I just don't know which one to use for a small project.

limber pagodaBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

tepid pumice
#

could you use just react context for this?