Only one of multiple server actions execute from multiple client components
Unanswered
Florida White posted this in #help-forum
Florida WhiteOP
Hi!
I'm experiencing something odd when calling multiple server actions from different client components in my app. It seems that only the first server action gets fired, while the other actions stops the execution somehow and the promises never resolves. Server side code never gets executed.
The client components are rendered on the same page simultaniously and all server actions are fired from useEffects.
This happens when I navigate from one page to another. On a page refresh all actions runs as expected.
Is it something about the nature of server actions that I'm missing? Is this expected bahviour?
I know that it is not recommended to use server actions for data fetching, but I cannot understand why this should fail.
I'm experiencing something odd when calling multiple server actions from different client components in my app. It seems that only the first server action gets fired, while the other actions stops the execution somehow and the promises never resolves. Server side code never gets executed.
The client components are rendered on the same page simultaniously and all server actions are fired from useEffects.
This happens when I navigate from one page to another. On a page refresh all actions runs as expected.
Is it something about the nature of server actions that I'm missing? Is this expected bahviour?
I know that it is not recommended to use server actions for data fetching, but I cannot understand why this should fail.
1 Reply
Florida WhiteOP
@Siberian any help?