#Next 14 | Server Actions being spammed

1 messages · Page 1 of 1 (latest)

lofty groveBOT
#

🔎 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)

dusty mirage
#

you're misusing server actions, that's why

#

also I assume that Next/React has no way of knowing if prisma.status.whatever is stable (contrary to fetch, which it expects to be stable based on URL, params and headers, therefore it caches it) so your component that awaits getStatus() rerenders forever?

#

delete the "use server" because there's no reason to go over HTTP when wanting to fetch data between a server function and a server component

#

wdym prisma can't run

#

it's still on the server even after you remove "use server"

#

that's not a next error, that's a prisma error, maybe prisma doesn't support next 14 yet

#

running in 'unknown'

#

so prisma doesn't support RSC?

#

hard to say, their article and demo for RSC are outdated

#

no "use server" here

#

status is a client component? you failed to include that in the OP

#

there's no "use client" there

#

well then I suspect the issue is that the component awaits something that doesn't look like it stabilises so it keeps rerendering forever

#

at least with an API route you will be aware that you need to secure it somehow

#

I'd like to point out that it's odd that your whole page is a client component