Seeking Help with Client Components/Server Components Issue – Can someone assist me, please?
Answered
Collared Plover posted this in #help-forum
Collared PloverOP
I've recently started learning Next.js 14 and am working on building my first website using it. I encountered an error which I think is related to client-side rendering, which I haven't fully grasped yet. I would appreciate any help you can offer. Thanks!
Answered by Collared Plover
Hi, thanks. I did try that, but I encountered another error that states, 'Server actions must be async functions.' I guess I need to better understand asynchronous functions. I'm going to quickly watch a video to gain a better understanding. JavaScript can be a bit challenging.
2 Replies
Hello! inside that function, at the top, make sure you add "use server".
Collared PloverOP
Hi, thanks. I did try that, but I encountered another error that states, 'Server actions must be async functions.' I guess I need to better understand asynchronous functions. I'm going to quickly watch a video to gain a better understanding. JavaScript can be a bit challenging.
Answer