Migrating from Next
thinking about migrating a project from next over my new year break, got a few questions:
1. is there an equivalent for
i have four usages:
a) database req: not critical, revalidates every 15 minutes
b) fetch req: not critical, revalidates every 5 minutes
c) fetch req: not critical, revalidates every 24 hours
d) fetch req: critical, revalidates every 12 hours
for a, b & c, i could turn these into server functions with cache control headers, then run them on the client via useQuery, but then that would introduce a waterfall
my understanding is that if i ran these on the server in a loader, the cache control headers wouldn't do anything as it just executes as a normal async function?
2. currently using the experimental next streaming and dehydration package. start just handles this use case out of the box right?
3. currently using nuqs (https://github.com/47ng/nuqs) to prevent RSC round trips upon search param change. my understanding of TSR is that i wouldn't need this anymore as it actually has sane search params management?
4. currently on react 19 and using the compiler, are these supported at all?
1. is there an equivalent for
unstable_cache, "use cache" or fetch() caching? currently these use the vercel data cache, so i'd like to continue this without needing a separate redis instance.i have four usages:
a) database req: not critical, revalidates every 15 minutes
b) fetch req: not critical, revalidates every 5 minutes
c) fetch req: not critical, revalidates every 24 hours
d) fetch req: critical, revalidates every 12 hours
for a, b & c, i could turn these into server functions with cache control headers, then run them on the client via useQuery, but then that would introduce a waterfall
my understanding is that if i ran these on the server in a loader, the cache control headers wouldn't do anything as it just executes as a normal async function?
2. currently using the experimental next streaming and dehydration package. start just handles this use case out of the box right?
3. currently using nuqs (https://github.com/47ng/nuqs) to prevent RSC round trips upon search param change. my understanding of TSR is that i wouldn't need this anymore as it actually has sane search params management?
4. currently on react 19 and using the compiler, are these supported at all?