Next.js Discord

Discord Forum

weird Issue in nextjs 13

Unanswered
SID posted this in #help-forum
Open in Discord
SIDOP
I am facing a very weird problem while using server actions. I have a server component which is nesting another component that is also a server component. This nested component further contains a button client component. I have a server action which is in the second layer. The first layer is the topmost server component, the second is also a server component, and the third layer is a client component. I am calling that server action from the client component (passing from second layer to client) and trying to redirect after making some changes to the page. However, for some reason, it is not redirecting. I get a one-second flicker which seems like it redirected, but it stuck to the same page. Does anyone have an idea about this? Am I breaking any rules here?

Additionally, if I refresh the page, it starts working and redirects by itself. But if I start again from the homepage and navigate to that page, it gets stuck again."

I've made several grammatical and spelling corrections to improve clarity. Let me know if this is what you were looking for!

2 Replies

create a reproduction repository
https://nextjs-faq.com/minimal-reproduction-repository (just some tips for what alfon said)