Next.js 14 Tutorial - 30 - Conditional Routes

preview_player
Показать описание

📱 Follow Codevolution

Conditional Routes
Рекомендации по теме
Комментарии
Автор

To complete the given task, added the default.tsx in @login slot folder

dhavalvanjara
Автор

In the default.tsx you can use the following:
import LoginPage from "./page";

export default LoginPage;

this will import the LoginPage Export default from your page.tsx, which means that the default.tsx will always be up/to date with the page.tsx. There are scenarios where this may be helpful.

justtil
Автор

Completed task: by adding default.tsx file in login slot.

faizanahmed
Автор

Hi all

If you have the blank page issue even if you restarted dev server just delete “.next” folder then re run dev server again and that’s all 👌🏼

miguelwayas
Автор

make sure to restart the dev server if page.tsx from @login is not working conditionally.

sohamdebnathpopo
Автор

I needed to restart the server with 'yarn dev' to see the 'login' component get rendered. Why?

sharpesthawk
Автор

what if we have a logic in any slot and we have parallel routes, do we need to add the same logic in default.tsx as well? for each unmatched routes?

shaheryarasif
Автор

task Completed Sir and Noted in Notes, Thank you soo much . Waiting for Upcoming Class.

skanwar
Автор

It looks like there will be 2 login pages - one in @login slot and in (auth) section.

firewatermoonsun
Автор

done adding the default.tsx in @login slot

disxixo
Автор

로그인 Card가 나타나지 않는 경우
1. 서버 종료 후 npm run dev
2. @login 슬롯 폴더에 default.tsx 추가

Userkki
Автор

the condition is working, but why is nothing displayed even login.tsx?

muhammadfadll
Автор

I had to add <> {login}</> - for it to work properly - but maybe that would have worked with the default.tsx, too. I don't know.

OldYgg
Автор

i did add on the login folder a default.tsx

fncjgkj
Автор

i use default.tsx in @login slot but it didnt work, i dont know why i also restarted the dev server but default.tsx is not being displayed

genztechman
Автор

added a default.tsx page in the @login folder

romanyfayiez
Автор

3:37 create default.tsx file in archive route then remove that error

parthpatel
Автор

If Login page is not working on condition, make sure to restart the server.

stylinali
Автор

Make the file default.js or default.tsx in @login folder to handle the 404 error

xktswqw
Автор

Isn't there a better way to have a page.tsx and a default.tsx without duplicating the whole code?

Gabriel-klbt