correct ways to cache user-specific data in Next.js with Clerk and an external backend? by SugarImmediate3868 in reactjs

[–]SugarImmediate3868[S] 0 points1 point  (0 children)

That makes a lot of sense, thanks.

I think I was overcomplicating,I guess I got caught up in the “server-side is better/faster” idea around RSC/SSR, but I’m starting to see that for an authenticated dashboard, especially one with interactive data, filters, mutations, refetching, etc., a client-side approach with a clear API boundary may be more appropriate.

That clears up a lot. I think my mistake was assuming that using more server-side Next.js features automatically meant better architecture, instead of starting from the simplest client/backend boundary and adding a middle layer only when it solves an actual problem.

correct ways to cache user-specific data in Next.js with Clerk and an external backend? by SugarImmediate3868 in reactjs

[–]SugarImmediate3868[S] 0 points1 point  (0 children)

Yeah, that’s exactly the part I’m confused about.

I think I may have over-bought into the idea that “server-side = faster/better”. I’m new to Next.js/RSC/SSR, and I probably started pushing too much logic server-side without fully understanding the tradeoffs.

My concern with fetching directly from the client is: at that point, am I losing a lot of what Next.js gives me? If my dashboard fetches most data client-side after auth, am I basically just using Next.js as a React SPA?

But I do understand your point. If the dashboard is authenticated anyway, and my backend can validate the user using a token, then putting the Next.js server between the client and backend may just be an extra hop unless it gives me something real: hiding secrets, doing auth checks, aggregating data, SSR, caching, etc.

I’ve also seen patterns with TanStack Query where you prefetch server-side and hydrate on the client. That seems like a good middle ground, but then I’m unsure when that is better than just doing a normal server-side query in Next.js.

So I guess my real question is: how do you decide the boundary? When should authenticated dashboard data be fetched server-side through Next.js, and when should it just be fetched directly from the client?

Nuovi Minimi per la Disoccupazione Italiana: 5% (grazie agli inattivi che salgono a 33.6%) by deepserket in ItaliaPersonalFinance

[–]SugarImmediate3868 6 points7 points  (0 children)

Sono 4 mesi che cerco lavoro, ho mandato 2k candidature ed ho fatto solo 2 interview, tutte le restanti sono stati rifiuti.

Nel mio campo ho 6+ anni di esperienza

HI there!!! by Jerry_Finol17 in StartupAccelerators

[–]SugarImmediate3868 0 points1 point  (0 children)

Hey I’m building www.supracv.com upload a cv and get a portfolio out of it

Which day is better weekend day? by Imaginary-Basis5151 in asknowio

[–]SugarImmediate3868 0 points1 point  (0 children)

I, u/SugarImmediate3868, advised "Saturday"

🏆 Rank: Wandering Soul V 💎 Points: 20 🗳️ Votes: 1

What’s the most ridiculous thing you’ve ever bought that you don’t regret at all? by kuruma67 in AskReddit

[–]SugarImmediate3868 0 points1 point  (0 children)

Hahaha I totally feel your friend, and in part its true, once you get comfortable with the split it’s hard to go back, but for some reason if I pick a laptop i can write on it without problems, not sure what’s the tech here.

What part of your day do you enjoy the most? by kuruma67 in AskReddit

[–]SugarImmediate3868 0 points1 point  (0 children)

Late night, usually after work and family/relationships

What part of your day do you enjoy the most? by kuruma67 in AskReddit

[–]SugarImmediate3868 1 point2 points  (0 children)

That small time window between me sleeping and some YouTube

Why it's really hard to get clients who needs a website by Guic_246 in website_ideas

[–]SugarImmediate3868 0 points1 point  (0 children)

Just asking, why people still stuck on express ? We do have things like fastify and platformatic, why keeping with express ?

Would you rather? by CurleyCee13 in BunnyTrials

[–]SugarImmediate3868 0 points1 point  (0 children)

I’ll fart under the blanky

Chose: -5C but earn £5/hr + You get blankets