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

Комментарии • 34

  • @danieljing9319
    @danieljing9319 5 месяцев назад +2

    very informative and easy to understand

  • @user-xu1fy2vh7i
    @user-xu1fy2vh7i 4 месяца назад +17

    I have a problem where the parallel routes don't appear in the browser until I restart the local server

    • @kukiponosanhrvat
      @kukiponosanhrvat 3 месяца назад +2

      Man, you really saved me a lot of time 😂😆

    • @ANKITCHAUHAN-do2ug
      @ANKITCHAUHAN-do2ug 2 месяца назад

      Bro I regret not checking the comment section earlier. 😞 could have saved my 10 mins

  • @user-cd5qo1pq4t
    @user-cd5qo1pq4t 5 месяцев назад

    I really like your teaching and now I am willing to expect your express.js courses bro

  • @user-hd3ez4ie6q
    @user-hd3ez4ie6q 4 месяца назад +3

    What about 2 slots with routes? And you navigate both. How to deal with it?

  • @MrUNhelp
    @MrUNhelp 4 месяца назад +1

    Are both necessary? Page.tsx and default.tsx or can I just remove the page.tsx?

  • @rahularora1079
    @rahularora1079 6 месяцев назад +2

    When will you add videos to React Native playlist?

  • @user-cs4ux7ow1w
    @user-cs4ux7ow1w 5 месяцев назад +3

    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.

  • @loveboat
    @loveboat 4 месяца назад +14

    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?

    • @CrimsonJoker641
      @CrimsonJoker641 4 месяца назад +2

      That’s exactly what I was thinking

    • @johnnywoodtke8629
      @johnnywoodtke8629 3 месяца назад +1

      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.

    • @MeerUzairWasHere
      @MeerUzairWasHere 2 месяца назад

      same lol

    • @king_james_official
      @king_james_official 19 дней назад

      yeah this sucks lol

  • @shivagurung4161
    @shivagurung4161 Месяц назад +3

    Is it not inefficient? Creating two files with same code.

  • @muhamadizranovan1653
    @muhamadizranovan1653 3 месяца назад +5

    so, if you have ten slots, it means you should create default.tsx on every slots?

    • @ShubhamGupta-RSA
      @ShubhamGupta-RSA 9 дней назад

      you are already creating 10 page.tsx, then why can't default.tsx

  • @KamalSingh-zo1ol
    @KamalSingh-zo1ol 2 месяца назад

    @codevolution What happens if 2 slots have configuration. how are router handled then?

  • @yw3546
    @yw3546 2 месяца назад

    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.

  • @ShivShankar000
    @ShivShankar000 2 месяца назад +4

    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?

    • @MrNibbleSprites
      @MrNibbleSprites 2 месяца назад

      Interesting question, I'm interested in an answer.

    • @ShivShankar000
      @ShivShankar000 2 месяца назад +2

      @@MrNibbleSprites I found answer on chat gpt, we can import page from ./page and then export default page.

    • @user-un9rr8nw2u
      @user-un9rr8nw2u Месяц назад +1

      @@ShivShankar000 It works, but the file structure is confusing

  • @sharpesthawk
    @sharpesthawk 6 месяцев назад +1

    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?

    • @user-cs4ux7ow1w
      @user-cs4ux7ow1w 5 месяцев назад

      is it showing you any errors? are you in dev mode from running `npm run dev` ?

    • @sharpesthawk
      @sharpesthawk 5 месяцев назад +2

      @@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.

    • @user-cs4ux7ow1w
      @user-cs4ux7ow1w 5 месяцев назад

      @@sharpesthawk niice thanks! great to know it

    • @franchinna
      @franchinna 4 месяца назад

      every slot need default.jsx and loading.jsx ?? @@sharpesthawk

  • @hayatudeenyusuf1030
    @hayatudeenyusuf1030 6 месяцев назад +1

    First viewer,
    Link me up man as entry level react typescript engineer

  • @rahularora1079
    @rahularora1079 6 месяцев назад

    Can you please add one full project for react native?

  • @user-ww4gz7wx4t
    @user-ww4gz7wx4t 2 месяца назад +1

    seems so many made up stuffs happening with nextjs...

  • @kikevanegazz325
    @kikevanegazz325 2 месяца назад

    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?