112 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
47
views
When calling the same server action on the client side, the second request disappears
I have a request which its get wallet details in server action. First request is working properly. But after user changes, I can see log top of it but its not entering server action. For example:
...
0
votes
1
answer
76
views
Implementing cache for server actions
I'm new to caching, if I understand correctly, with caching, a database query would only run once for a specific amount of time (e.g. 1 hour) until it's revalidated, but I read server actions are not ...
0
votes
1
answer
131
views
Controlled Select Element Loses Value After Form Submission with useActionState in Next.js
I'm building a form—ideally using the useActionState server-action setup—that needs to persist its values during submissions. The problem is, I can't use the defaultValue prop on the element, because ...
0
votes
0
answers
36
views
Error: Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported
import { z } from "zod";
/* --- helpers ------------------------------------------------------------ */
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const intlPhoneRegex = /^\+?\d{10,15}...
0
votes
1
answer
86
views
Data undefined in Vercel NextJS production with Mongoose
So I have some models in my MongoDB database, which details I am trying to fetch via Mongoose in NextJS, everything works in development but in production the data is not being fetched. I have been ...
0
votes
1
answer
47
views
middleware doesn't recognize session when using server actions
after some work i found out that when using server actions to hit some route handler the session will be undefined because server actions run on the server without a request context from the browser, ...
0
votes
0
answers
17
views
Interactive Elements on Redirected Page (/tickets) Become Unresponsive Until Hot Reload
I'm encountering an issue in my Next.js 15 project where after a successful server action that deletes an item and then redirects to the /tickets route using next/navigation.redirect(), the ...
0
votes
0
answers
54
views
Next.js server action not receiving correctly decimal numbers
I'm facing an issue in my Next.js application where I'm passing a decimal number (as a string) as a query parameter to my API. The API works fine when tested directly using Swagger and also works when ...
0
votes
1
answer
39
views
Server actions gets called only once when called quickly
I have a client component, and have two aggregation options - daily | weekly
params.aggregation is always an array of single string item (its value is derived from useQueryStates).
When I change the ...
-1
votes
1
answer
84
views
using server actions with route handlers when making NextJS API endpoints
I have a web app that needs to expose APIs for mobile app (GET, POST, PUT AND DELETE endpoints), currently i'm doing the fetch in both client and server components, but i looked at the client ...
2
votes
1
answer
944
views
Next.js Server Actions Causing Full Page Re-renders in Client Components
I've been experimenting with Next.js Server Actions and noticed something unexpected while analyzing re-renders using React Scan.
When I add an onClick handler to a button that updates a useState ...
-1
votes
1
answer
247
views
TypeError: f.v2.config is not a function
I try make an app like instagram. Using nextjs 15 app router. For file storage i'm using cloudinary. Everything is fine in development but in production error occurs.
When i try to perform like post ...
1
vote
1
answer
495
views
What is Causing the Payload Argument must be type object when data matches the schema
I am getting an error
⨯ [TypeError: The "payload" argument must be of type object. Received null] {
code: 'ERR_INVALID_ARG_TYPE',
digest: '447529059'
}
when I have the following prisma ...
0
votes
0
answers
308
views
Next.js 15: Error setting cookies in server action
I use Next.js 15. Like shown below I pass a server action "onLogin" to a client component called "LoginForm". the action is called when a user clicks on the login button in the ...
2
votes
1
answer
963
views
How to Pass Additional Arguments to formAction in Next.js 15 Using useActionState?
I have a contact form that's a client component in a Nextjs 15 project.
I've integrated Google captcha v3 into my project after following the Google captcha's documentation.
When someone submits the ...