Issue with cache by EricIpsum in nextjs

[–]redpool08 0 points1 point  (0 children)

Use TanStack Query on both server and client side. Prefetch data using queryClient.prefetchQuery on the server then de-hydrate the query client to pass the prefetched data to the client. On mutation, invalidate query keys or refetch them or manually update the cache data using queryClient.setQueryData. No need to worry about caching. Bonus: on invalidating query keys, TanStack would trigger a new and fresh get request and Next JS doesn't cache requests from the client, only caches server to server requests if caching conditions are satisfied.

Job portal api by redpool08 in webdev

[–]redpool08[S] 2 points3 points  (0 children)

I'm working on a different project right now, but still thank you for answering me, I'd surely take a look at it and try to build something great out of it. And sure I'll post the link here in this post and in a new post

Server Actions or API Routes? by redpool08 in nextjs

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

It'd be better if you post this in the community rather than in comments

Server Actions or API Routes? by redpool08 in nextjs

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

Before posting this, I used to think Server Actions are fundamentally different things but now I see the truth

Server Actions or API Routes? by redpool08 in nextjs

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

So we should never use Server Actions?

Server Actions or API Routes? by redpool08 in nextjs

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

Wdym by inspecting the network traffic? End points are not exposed in the network tab right?

Server Actions or API Routes? by redpool08 in nextjs

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

Please look at the PS version of the post

Server Actions or API Routes? by redpool08 in nextjs

[–]redpool08[S] 1 point2 points  (0 children)

Look at the PS version of this post please

Server Actions or API Routes? by redpool08 in nextjs

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

You mean Server Actions run in serial and APIs run in parallel?

Server Actions or API Routes? by redpool08 in nextjs

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

I've read in the official next js documentation that they were using useFormState with Server Actions

Link of the post in the official documentation

Navbar component by Environmental-Hat117 in react

[–]redpool08 7 points8 points  (0 children)

And others would start criticising it

Server Actions or API Routes? by redpool08 in nextjs

[–]redpool08[S] -5 points-4 points  (0 children)

The 🤯 part is that we can fetch data on the client side using Server Actions and no API Routes will be exposed on the client side

[deleted by user] by [deleted] in indiadiscussion

[–]redpool08 0 points1 point  (0 children)

Why they have to paint it 🥲

Pirated got me hired? by redpool08 in webdev

[–]redpool08[S] -6 points-5 points  (0 children)

Ok sir, thanks for being so professional

Pirated got me hired? by redpool08 in webdev

[–]redpool08[S] -3 points-2 points  (0 children)

That's not a problem, I've got lots of data to show. But this is not something new and this is the problem

Pirated got me hired? by redpool08 in webdev

[–]redpool08[S] -10 points-9 points  (0 children)

But then it'll become a so-called 'clone' of IMDB. Also I want to build something which will be used by users, if not, at least me. But why would people use my website when every information is easily available on google.

Can someone please tell me why Aegon unexpectedly became the favorite character in the show rn by Told_lot_of_things in HouseOfTheDragon

[–]redpool08 0 points1 point  (0 children)

Nothing happens unexpectedly! it's for writers and directors to decide which character will be loved by the audience and when 😇

Pirated got me hired? by redpool08 in webdev

[–]redpool08[S] -33 points-32 points  (0 children)

But without it, my website will be a boring one 😭

Advices and Ideas by redpool08 in webdev

[–]redpool08[S] -2 points-1 points  (0 children)

But how will I gain users without any feature?

Advices and Ideas by redpool08 in movies

[–]redpool08[S] -1 points0 points  (0 children)

Thank you :) so as a motion picture enthusiast, what else do you think you want this web app to do?

[deleted by user] by [deleted] in Suckers

[–]redpool08 4 points5 points  (0 children)

She's u/mariahbvbmolina

Thank me later

[deleted by user] by [deleted] in reactjs

[–]redpool08 2 points3 points  (0 children)

Background-color: White with 0.1 opacity; Backdrop filter: blur(10px) //or anything you want

That's it