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
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner