Next.js Pages, Layout, Links, Routes & Loading | Next.js 13 tutorial

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

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

  • @rohit_dev
    @rohit_dev Год назад +11

    I was going to start Next JS but almost all the courses are outdated after the release of Next JS 13 (according to some Next JS Devs). So I was searching for an updated course and here you are. Thanks for bringing the updated Next JS series that too for free on RUclips. Just a request, if you can upload a video daily, this will help us to learn it faster.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +7

      I cannot upload daily because this is not my full-time job. Maybe one day.

    • @rohit_dev
      @rohit_dev Год назад

      @@DaveGrayTeachesCode Oh I understand. No issue. I'll wait

  • @andrelima9428
    @andrelima9428 10 месяцев назад

    This is incredible. I was trying some other full projects tutorials, but couldnt understand what was happening, I was just copying the code. Now I'm understanding what is happening

  • @sahaneakanayaka3394
    @sahaneakanayaka3394 Год назад +18

    Love this NextJs series Dave. Definitely going to follow this till end. Really appreciate your work ❤❤❤

  • @mohitraj4878
    @mohitraj4878 Месяц назад

    Your channel is just gem

  • @imkir4n
    @imkir4n Год назад +2

    I can't wait till Friday's Dave 😭

  • @arinspanner
    @arinspanner Год назад +1

    Thanks Dave, another intuitive and well-explained video. I am building my own website in Next and this tutorial dropped at the perfect time!

  • @raminkhodaie4063
    @raminkhodaie4063 Год назад +3

    I definitely sure these series will be awesome like others.keep going on

  • @danieljing9319
    @danieljing9319 Год назад +1

    yessss!! can't wait for the next video about Nextjs 13!!!

  • @travisv6431
    @travisv6431 Год назад +1

    Thank you for this tutorial series! It is exactly what I was looking for (building upon existing React knowledge and slowly introducing the new Next.js concepts).

  • @ruantristancarlinsky3851
    @ruantristancarlinsky3851 Год назад

    I genuinely cannot wait for this to series videos. Waiting very patiently for each video Dave. 🙏

  • @juandaniel6726
    @juandaniel6726 Год назад +4

    Hi Dave, thank you so much for all the effort and dedication you put on this awesome tutorials.

  • @RedJupiter2020
    @RedJupiter2020 Год назад

    This Video dispelled a lot of confusion for me is brilliant. Thank you💪

  • @khalilbenmeziane8836
    @khalilbenmeziane8836 Год назад

    best teacher ever thank you dave

  • @TravinskiyVladislav
    @TravinskiyVladislav Год назад +2

    Thank you Dave

  • @AliMaher212
    @AliMaher212 Год назад

    Thx Dave. Can't wait for the third lesson

  • @danieljing9319
    @danieljing9319 Год назад +1

    please include testing stuff in this series, there aren't too much about testing with nextjs 13 now.

  • @jonathanmaxsaraviamoreira3185
    @jonathanmaxsaraviamoreira3185 Год назад

    Really love this new series, i've already read the new oficcial documentation but see your videos is a must

  • @maximpolsky2683
    @maximpolsky2683 Год назад

    Thanks a lot! A special thanks for your English )) It is clear and easy to understand!

  • @CTILET
    @CTILET Год назад

    Thank you very much Dave! You are the best teacher in the web!

  • @atmanatos7165
    @atmanatos7165 Год назад

    This video is very helpful at a very early stage. 🍻

  • @Ellenox147
    @Ellenox147 Год назад +3

    Useful and clean content like always !

  • @jesseemana9598
    @jesseemana9598 Год назад

    patiently wating for the full series, btw can you make a video on useMemo and useCallback?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      You can search RUclips for "Dave Gray useMemo" or any other topic you want that I may have a tutorial for.
      Here is my useMemo: ruclips.net/video/oR8gUi1LfWY/видео.html
      Here is my useCallback: ruclips.net/video/FB_kOSHk1DM/видео.html

  • @karwanrasul7450
    @karwanrasul7450 Год назад

    That will be a very useful series, next js with ts, appreciate your work

  • @dexcoder1207
    @dexcoder1207 Год назад

    I was really looking for nextjs 13 series and I find your series which is really great and waiting for advance topics such as server side components thank you, Keep it up

  • @chrishanthacosta4093
    @chrishanthacosta4093 Год назад

    Wonderful Dave!!

  • @sonamohialdin3376
    @sonamohialdin3376 Год назад

    Thank you for this clear & useful tutorial

  • @carlandres3319
    @carlandres3319 Год назад

    Thank you so much Dave! You are making a positive impact to many people 🙏💯

  • @okonkwo.ify18
    @okonkwo.ify18 Год назад +2

    The current version is 13.2.3 , and I can add the metadata to the layout and don’t need to define its type. ❤

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +2

      Right - I cover this in today's video, too.

    • @okonkwo.ify18
      @okonkwo.ify18 Год назад

      @@DaveGrayTeachesCode I saw the today’s video. I will def visit it .

  • @abdulrahmanagboolaosho3582
    @abdulrahmanagboolaosho3582 Год назад

    Pls make a video on parallel routes and intercepting routes

  • @alessandroscimone5463
    @alessandroscimone5463 Год назад

    Absolutely amazing! thanks, the best on youtube!

  • @neenus
    @neenus Год назад

    Thanks Dave!! awesome as always

  • @nhatduyle4825
    @nhatduyle4825 Год назад +1

    thanks you, dave

  • @alexanderkomanov4151
    @alexanderkomanov4151 Год назад

    Wow! Your explanations are amazing!

  • @hamzaashraf9529
    @hamzaashraf9529 Год назад

    Superb Tutorial i love to watch this playlist awesome man

  • @jaychally2251
    @jaychally2251 Год назад

    woah, this kinda looks like the routing for sveltekit. I didn't know 13 introduced these features.

  • @aurelienchevillotte2874
    @aurelienchevillotte2874 Год назад

    Thanks for this NextJS series Dave. Do you plan to talk about api folder in NextJS ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      You're welcome! Eventually - but no rush. It provides the place for an api (if you want to provide one) and they just moved it in 13.2

    • @aurelienchevillotte2874
      @aurelienchevillotte2874 Год назад

      @@DaveGrayTeachesCode within this folder api we can safely put our models, controller, routes ?

  • @minhhieple6483
    @minhhieple6483 Год назад

    Hi Dave, do you know how to trigger Loading page when value of query parameter ? Currently Next.js only trigger when path change.

  • @ezequielamin
    @ezequielamin Год назад

    Thank you Dave for your content! It's awesome

  • @secretsorcerer
    @secretsorcerer Год назад

    Thank you so much Sir for this series.

  • @Peacemaker.404
    @Peacemaker.404 Год назад

    loading doesn't seem to appear(path change) when i deploy the app but if make it client it will, btw great tutorial dave.

  • @TarasHornik
    @TarasHornik Год назад

    Thank you so much for the explanation!!!

  • @twerner5496
    @twerner5496 Год назад +1

    Really enjoyed this video, new subscriber... I'm having an issue implementing the error handling and noticed the docs mentioned that "error.js boundaries do not currently work in next dev development environment"... could that be the reason my error.js file is throwing an '"undefined" is not valid json' error? Thanks!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      If you just created your project, you are using version 13.3 which is buggy. Type npm i next@13.2.4 in the terminal to install that version and see which problems (if any) still persist.

    • @gnouhp004
      @gnouhp004 Год назад +1

      I had the same problem using next 13.3 and downgrade it to 13.2.4 fixed it. Thank you.

  • @ΒινςΜοργκαν
    @ΒινςΜοργκαν Год назад

    Great teaching! 🤘🤘🤘

  • @erfan5875
    @erfan5875 Год назад

    Thank you for ur great courses dave. May I ask how many parts of videos will it be for Next.js13?

  • @elijahonduso
    @elijahonduso Год назад

    Amazing tutorial here❤. I have a question regarding routes protection when using next 13 routing. Any resource where I can get this?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Yes, later lessons in this series covers routes & middleware to protect them.

  • @sdsim1
    @sdsim1 Год назад

    Thank you for this good lecture!!

  • @alsafadimhmd
    @alsafadimhmd Год назад

    Thank you Dave, In this example during the video, what if I need to hide main nav from about page only , how can I do it in next 13.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Welcome! I haven't covered it yet, but you could use the usePathname hook to determine which page you are on and then logically show or hide it: beta.nextjs.org/docs/api-reference/use-pathname

    • @alsafadimhmd
      @alsafadimhmd Год назад

      @@DaveGrayTeachesCode Thank you it works fine with usePathname 🤗

  • @kalanakt9764
    @kalanakt9764 Год назад

    very helpfull 🌟🌟. waiting for next video.

  • @nepalrameshwor1540
    @nepalrameshwor1540 Год назад

    thank you for the course

  • @ekay
    @ekay Год назад

    Great videos! But can you make the series of some system design like Chakra UI or Material UI please!

  • @oggyoggy5543
    @oggyoggy5543 Год назад

    Hi I want to use external css link from cdsn like animate.min.css.. But it's not loading in next js project. Where should I put the link. Currently it's in Head Tag from next/head

  • @Web-Himansu
    @Web-Himansu Год назад

    sir can use nextjs, nodejs, mongodb, for learn in depth and more from their official documentation

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Not sure what you are saying here, but I recommend you follow my free Web Dev Roadmap if you are wondering which order I recommend you learn in: bit.ly/DaveGrayWebDevRoadmap

  • @loukhai
    @loukhai Год назад

    dave dave the great dave ✨♥️

  • @khizerrehman7227
    @khizerrehman7227 Год назад

    I want to know how did you make vs code so beautiful....which extensions are you using

  • @xTiger77
    @xTiger77 Год назад

    Hey Dave, this is a great tutorial series and is of the same quality I'd typically see on sites like Udemy, if not better! Quick question, with layouts we can include content to all children of a given directory. But what if we wanted to remove content? For example if I wanted to have the "My Navbar" on all pages except those in the "about" directory, instead using the "About Navbar" for those pages. Is this fairly simple to accomplish? Thanks, and sorry if this is already answered in a later video!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      You can provide layout files for each path / directory. Instead of using one at the root level, structure your directories to provide what you need.

  • @allone258
    @allone258 Год назад

    thanks sir Dave

  • @nguyenanh-vt4jv
    @nguyenanh-vt4jv 7 месяцев назад

    is this still good when I learn next14

  • @computertechnology217
    @computertechnology217 Год назад

    i'm actually getting confused, how can i manage the _app and document file stuff, like i use material-ui before the nextjs13 in _app.tsx file i use to initialize ThemeProvider and many more stuff and in document.tsx i initialized the @emotion/server and many more, how can i handel this right now?

  • @mrpaulishaili
    @mrpaulishaili Год назад

    Thank you 💕!

  • @hezbonotieno6130
    @hezbonotieno6130 Год назад

    What VS theme are you using? I really like it

  • @ravenMK_
    @ravenMK_ Год назад

    Hey Dave, I'm now learning NextJS. I was struggling at the beginning because there's two different docs. The pages directory docs and the app docs. Most youTube tutorials suggest starting out with app directory but it's not in stable mode and not ready for production. Makes me wonder why you're tutoring us a version that we cannot deploy to production.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      I believe I mentioned in the video, this is the way Next.js is headed. Why teach the old way and have a useless tutorial in months?

  • @Mike-ks7nr
    @Mike-ks7nr Год назад

    if I have a nav bar in my RootLayout, it still shows up in my signin page with a different layout file.

  • @slahomar1497
    @slahomar1497 Год назад

    Thankssss a lot, what if I want to set a global loading.js ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      Did you try it? Best way to find out. 🚀 Reference docs: beta.nextjs.org/docs/routing/loading-ui

  • @dhinakaransaravanan766
    @dhinakaransaravanan766 7 месяцев назад +1

    Hi Dave data pre fetching not working in current version next js 14.1.3 and even tried with production mode is not pre-fetching. I refer lots of article still i cant find the solution, here can anyone help me to know the issue when mouse hover to components then the data will pre-fetching in this video but current version not working. please tell me then how to archive the pre-fetching data in current version 14.1.3

  • @danilocecilia7831
    @danilocecilia7831 Год назад

    how would you remove the main navbar on a login page for example? Since the Rootlayout is shared throughout the application...

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      Consider two parent paths instead of putting it in the root layout. One path for your login and anything else that should not have the navbar. Another parent path for anything that should have it. Another possible solution: look at the URL string value and conditionally include the navbar if it is not the /login URL. Just a couple of quick ideas.

    • @danilocecilia7831
      @danilocecilia7831 Год назад

      @@DaveGrayTeachesCode the first idea didn't quite worked, as my main page which is the root url `/` uses the RootLayout so even though I set a layout for the login page it is still uses the rootLayout.
      The other idea of looking at the url string didn't quite worked as couldn't use the router function inside the rootLayout.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      @@danilocecilia7831 either could work if you stop using the root layout. Use layouts in the appropriate parent path. I think you'll figure it out.

  • @mdkawsarislamyeasin4040
    @mdkawsarislamyeasin4040 Год назад

    Please create a video in Dynamics Routes,
    Also I saw some people crate file using brackets
    For example, [id], (example), {anotherExample} like this
    Would you please explain this for us! ❤
    Thank you ❤️‍🔥

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Keep going in this series of videos. I do explain it.

    • @mdkawsarislamyeasin4040
      @mdkawsarislamyeasin4040 Год назад

      @DaveGrayTeachesCode Thank You, I'm gonna complete this playlist
      It’s really beginner Friendly and Awesome tutorial Videos ❤️

    • @binarybulletin
      @binarybulletin 29 дней назад

      Hello dev how to overcome to this situation in this app will be many error same name components can i use custom name of error and layout components.?​@@DaveGrayTeachesCode

  • @samiullahsheikh5015
    @samiullahsheikh5015 Год назад

    NextJS isn't still in beta phase?
    and after react-server-component what's the purpse of NextJS?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      As I answer your question, Next.js 13 with the new app directory is still in beta as the docs show: beta.nextjs.org/docs ...this may not be the case if others read this in the future. Next.js has lots of benefits that I cover in the first video of this series.

  • @90kidsgamezone76
    @90kidsgamezone76 Год назад

    next part wating

  • @adarshrathi8265
    @adarshrathi8265 Год назад +1

    Dear sir, why you not tailwind css in next js videos

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      Patience. I mentioned in the first video that this series will eventually use Tailwind. 👀

  • @darelbvcr687
    @darelbvcr687 Год назад +1

    can you make next 13 tailwind typescript project?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +3

      Did you watch the first video in this series? I may have mentioned those technologies for this series and there will be a project.

  • @ashishjaswal7806
    @ashishjaswal7806 Год назад

    Hi dave can you please make a tuorial authentication in next js

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      I want to do this. It will be sometime after completing this series of fundamentals as it is more of an advanced topic.

  • @imkir4n
    @imkir4n Год назад

    Dave did they removed page folder in the new version? i can see the api folder inside app directory now

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      As mentioned in the video, Next.js is changing rapidly and we are learning as things change. They just released 13.2 last Thursday (Feb 23): nextjs.org/blog ..I will cover changes as this series progresses.

    • @imkir4n
      @imkir4n Год назад

      @@DaveGrayTeachesCode alright I'm following the docs along with your videos

  • @ateshangunduz
    @ateshangunduz 11 месяцев назад

    How do we put the links on layout.tsx. They dont work there.

  • @alijawwad1763
    @alijawwad1763 Год назад

    Hello Dave. I am building an app. When I am using next/link my page is refreshing. Is this normal or am I missing something?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      If you are linking to another page, you should go to the page you are linking to. That would render the new page, but it is not the same as a "refresh". In a later chapter, I discuss the differences of hard & soft navigation in Next.js. You might look those up in the docs if you are having issues now.

  • @noname-oo3xr
    @noname-oo3xr Год назад

    I can not get any client component working, even the ones from next docs. does anyone faces this issue and how to fix ?

  • @A03L
    @A03L Год назад

    Hey, Can we use Vite with nextJS ?
    Create-next-app is slow for me

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Here you go: www.google.com/search?q=can+you+use+vite+with+nextjs

    • @A03L
      @A03L Год назад

      @@DaveGrayTeachesCode Thank you

  • @olegmaz3969
    @olegmaz3969 Год назад

    The layout.tsx it seems the same like _document.tsx in Next.js 12

  • @afaqahmad8918
    @afaqahmad8918 Год назад

    Cheers 🥂🍾

  • @NoumanKhan-ug7ks
    @NoumanKhan-ug7ks Год назад

    what if i dont want a directory to have root layout and have differeny layout for example user has different layout and admin has different layout

  • @muhammadroushan8906
    @muhammadroushan8906 Год назад

    I don't have pages directory on installation - why is that? If you could clear up this confusion. My api dir is inside app.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Next.js is changing fast. You will see why in the 3rd video of the series.

    • @muhammadroushan8906
      @muhammadroushan8906 Год назад

      @@DaveGrayTeachesCode Thank you for the swift response, loving the series 👍👍👍

  • @speedster784
    @speedster784 Год назад

    Are you going to build a full project at the end to put everything together??

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +2

      Yes, there will be definitely be a project.

    • @speedster784
      @speedster784 Год назад +1

      @@DaveGrayTeachesCode within that project if you add authentication with next auth credentials provider can you also add the ability to do email verification without using the magic Link only credentials provider 🤔

  • @frackinfamous6126
    @frackinfamous6126 Год назад

    @DaveGrayTeachesCode I keep getting linting errors in the beginning of this video. "cannot find h1". I have the file type set to TSX and tried a couple other things. I'm assuming it's an ESlint issue. I always have probelms with it. Would be great to see a "poduction project" vid where you go through all the set up of scripts, prettier, ESlint, Git ignore and so on. Your vids are the shit as usual!!! Keep it up brother.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Thank you! I did nothing special with ESLint here. Did you add an h1 that it is looking for? Small project(s) coming soon!

    • @frackinfamous6126
      @frackinfamous6126 Год назад

      @@DaveGrayTeachesCode Really weird but VS Code decided stop recoginzing my TSX/JSX files so I associaed them properly and had to completly restart VS code twice and it started working properly. Really looking forward to the projects. I have done a lot of tutorials and practice projecst. I struggle with what actually needs to be done to goto production. Thanks so much for the content and the quick reply!!!!!

    • @frackinfamous6126
      @frackinfamous6126 Год назад

      If anyone else runs into this issue, my exact fix was to add this to the VS Code settings.json
      "files.associations": {
      "*.tsx": "typescriptreact",
      "*.jsx": "javascriptreact"
      }

  • @ItsMe-oi9dy
    @ItsMe-oi9dy Год назад

    You need to specify this is App router and not pages router

  • @alefe238
    @alefe238 Год назад

    I've tried to install next with the docs explanation, but when i run npm run dev i get the following message: SyntaxError: Unexpected token '??=' and the app doenst run. Anyone having the same problem?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      The error should also tell you which file that is in. I do not remember that syntax in my examples.

    • @alefe238
      @alefe238 Год назад

      ​@@DaveGrayTeachesCode The error occurred because of my version of nodejs. When i updated it the error got away.

  • @zakidzz
    @zakidzz Год назад

    hope you do a super advanced next js appp super advanced not just advanced so we see real word

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Starting with the fundamentals for all, but projects will come.

    • @zakidzz
      @zakidzz Год назад

      @@DaveGrayTeachesCode yup but please do somthing super advanced bcause you dont find here in youtube

  • @saidibrahim5931
    @saidibrahim5931 Год назад

    What about express js ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Unrelated to Next.js, but my Express.js series playlist is here: ruclips.net/p/PL0Zuz27SZ-6P4vnjQ_PJ5iRYsqJkQhtUu

  • @AbdukarimTojimatov
    @AbdukarimTojimatov Год назад

    respect

  • @NaveenKumar-i8q7o
    @NaveenKumar-i8q7o Год назад +1

    When I am trying to add error.tsx it is giving error JSON.parse error , Help me to resolve this.

    • @CHANWANITNUCHYOO
      @CHANWANITNUCHYOO Год назад

      Having the same problem rn.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +2

      Next 13.3 was just released and has some bugs. Check your package.json file to see the release you have. At the command prompt, type: npm install next@13.2.4 to go back to a more functional version for now.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      See my reply to the above.

  • @iAmTheWagon
    @iAmTheWagon Год назад

    Let's gooo!

  • @dipanshu-singh
    @dipanshu-singh Год назад +1

  • @dopetag
    @dopetag Год назад +1

    They have already deprecated head.tsx

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Correct, and I note that in the very next video because it happened between this video and the next one. Just keep going and I provide updates.

    • @dopetag
      @dopetag Год назад

      @@DaveGrayTeachesCode I'm on the next video already

  • @_techbk
    @_techbk Год назад

    Heritier here from the future, the head file is officially gone

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      Yes, I cover that as it happened in the next video in this series.

  • @SeaRich
    @SeaRich Год назад

    NextJS needs more practical examples to explain its mechanics , it becomes more complicated at the first sign.

  • @olatuborafelix7875
    @olatuborafelix7875 Год назад

    Thanks you Dave