2min chapter

HTML All The Things - Web Development, Web Design, Small Business cover image

Next.js App vs Pages Router

HTML All The Things - Web Development, Web Design, Small Business

CHAPTER

How to Switch Between Server and Client Components

How do you switch between the two? How involved is it if you make a mistake and you go server and you went to go client or vice versa? It depends. For the most part, yes, all you have to do is put that use client string at the top of your component and it'll immediately be a regular React component. But let's say in that component, for whatever reason, you're also doing some authentication. Because again, server components, you can do all the authentication. You can move any sensitive data back and forth between databases, API keys, environment variables,. Whatever the heck you want, it's not going to reach the client as long as you don't put

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode