DEV Community

Cover image for React Server Components ... React magic feature!! šŸ”®

React Server Components ... React magic feature!! šŸ”®

Alaa Mohammad on March 10, 2024

To understand the benefits of RSCs, I will briefly talk about Server Side rendering (SSR) and Suspense boundary. SSR works on initial page load (W...
Collapse
 
respect17 profile image
Kudzai Murimi

Thanks, for sharing with the community

Collapse
 
rnacken profile image
Ru

@a_m_h_gad

If I'm not mistaken you can do this with the header-cookies functions of next: nextjs.org/docs/app/api-reference/...

Set your cookie from a server action and read it in your page.tsx route, or in your middleware.

Collapse
 
a_m_h_gad profile image
Jad

Thanks for sharing šŸ’ž,
I've a question regarding authentication..

I've a Nextjs14 app which I will integrate with a PHP server usually I store JWT at localstorage and send it with all client side requests but of course it's not accessible on server side.

Is there a way I can store it on server side and use it on server side components ?

Thanks in advance.