Relative Content

Tag Archive for next.jsreact-server-components

React server component sends too many http requests for rsc payload

This is a code snippet of server component with Next.js 14. My trouble is that each item in the list will make a http request to obtain the RSC payload. The more items in this page, the more requests will be made, it increase the number of request in this page. Is there any way to solve this?

redirect function not working in my nextjs app

<form action={async (formData) => { “use server”; try { await login(formData); } catch (err) { console.error(err); return; } redirect(“/”); }}> this is my code inside server component and i use redirect function outside of try/catch and without that and inside it but still not working! inside try/catch return NEXT_REDIRECT error I have tried various ways […]

Separating RSC with RCC folder convention

I am almost exclusively working with Next 14 for 5 months now, I till today get confused while working and sometimes import wrong components. I am looking for a good convention so I can separate the files (Not folders).