Next.js Redirect Without Flashing Page (Next.js 14, App Router) #nextjs #nextjstutorial

preview_player
Показать описание
Use the redirect function from next/navigation to redirect without a flash of unauthenticated content.

📣 Follow Coding in Flow on social media:
Рекомендации по теме
Комментарии
Автор

Great! And if we add middleware that would be great in handling server side❤

exploitethicallyee
Автор

Does this work with a hook like const isAuthenticated = useAuth()

carlosdubon
Автор

Hmm. But we usually show loader in the first place and also split authenticated content and guest content. This is why i don't see why this feature might be useful

dmitrykulakov
Автор

Just use middleware which is triggered before loading any UI component. Done.

maker_aleks
Автор

Why not middleware bro ? This is not neccessary

lampham
Автор

Man I love his informative videos, but his way of speaking makes it feel COMPLEX ROCKET SCIENCE... 😅 appreciate the work though.

Earth_Being
Автор

Ye gods and little green goddesses, you kids with your SPA frameworks just make problems for yourselves. This would never be an issue if you used web technologies as given instead of trying to make them mimic desktop GUIs.

sehrgut