Next.js 14 Tutorial - 29 - Unmatched Routes
HTML-код
- Опубликовано: 30 июн 2024
- 📘 Frontend Interview Course - learn.codevolution.dev/
💖 Support UPI - support.codevolution.dev/
💖 Support Paypal - www.paypal.me/Codevolution
💾 Github - github.com/gopinav
📱 Follow Codevolution
+ Twitter - / codevolutionweb
+ Facebook - / codevolutionweb
📫 Business - codevolution.business@gmail.com
Next.js 14
Next.js Tutorial
Next.js 14 Tutorial
Next.js Tutorial for Beginners
Unmatched Routes
Unmatched Routes in Next.js
very informative and easy to understand
I have a problem where the parallel routes don't appear in the browser until I restart the local server
Man, you really saved me a lot of time 😂😆
Bro I regret not checking the comment section earlier. 😞 could have saved my 10 mins
I really like your teaching and now I am willing to expect your express.js courses bro
When will it drop mate?
What about 2 slots with routes? And you navigate both. How to deal with it?
Are both necessary? Page.tsx and default.tsx or can I just remove the page.tsx?
When will you add videos to React Native playlist?
This slots feature is great, however I have a question, is it possible to import the component from the page.tsx file to render it in the default.tsx? thanks a lot for these series, it's an amazing content.
I also have same question..
Huh. Slots seemed kinda useful until this point. Now I have to add ANOTHER file (default.tsx) to every goddamn page where you basically have to copy-paste your content. Ridiculous. What happened to DRY?
That’s exactly what I was thinking
You can prob import everything from page.tsx and export it all from default.tsx if you want your unmatched slot’s content to be the same after refreshing.
Alternatively, you could just use query params and not worry ab default.tsx.
same lol
yeah this sucks lol
Is it not inefficient? Creating two files with same code.
so, if you have ten slots, it means you should create default.tsx on every slots?
you are already creating 10 page.tsx, then why can't default.tsx
@codevolution What happens if 2 slots have configuration. how are router handled then?
Actually I found an issue in this section. I created the default.tsx and arranged files exactly like this in the video, then I added a not-found.tsx at /app/ folder as the root handler, then refresh the page, and it will show the not-found page instead.
in the default.tsx, can i export page from './page' as default or is it necessary to copy everything from page.tsx and put it in default.tsx?
Interesting question, I'm interested in an answer.
@@MrNibbleSprites I found answer on chat gpt, we can import page from ./page and then export default page.
@@ShivShankar000 It works, but the file structure is confusing
Hey Codeevolution, I have the same Directory structure with the same pages (i.e., page.jsx) as well as the same code, however I'm getting a blank white page when I route from "/complex-dashboard/archived" to "/complex-dashboard" after clicking on the . Can you tell me why?
is it showing you any errors? are you in dev mode from running `npm run dev` ?
@@user-cs4ux7ow1w bro the issue was for every segment we need to have loading.jsx/default.jsx file otherwise if one doesn't have it shows blank page.
@@sharpesthawk niice thanks! great to know it
every slot need default.jsx and loading.jsx ?? @@sharpesthawk
First viewer,
Link me up man as entry level react typescript engineer
Can you please add one full project for react native?
seems so many made up stuffs happening with nextjs...
Why wouldn't I want to render a route that shouldn't be parallel rendered, if I have declared it as parallel route?
Parallel routes are a very powerful structure, and I am sure that the Next engine has a way to determine when these routes have been declared as such. So, the matching of these components with the routes should be different. E.g. "/complex-dashboard" matches with three slots, regardless of what comes next. How come that's not relevant to the component-route matching system?