Next.js 13 SSG, SSR & ISR | Nextjs 13 tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 146

  • @imkir4n
    @imkir4n ปีที่แล้ว +9

    One more reason to enjoy Friday evening ❤️ thank you dave

  • @shacodes
    @shacodes 10 หลายเดือนก่อน

    Better than paid courses , no one teaches in depth like you

  • @toyal10
    @toyal10 ปีที่แล้ว +2

    Thanks dave im loving this series! Watched all of it so far

  • @sahaneakanayaka3394
    @sahaneakanayaka3394 ปีที่แล้ว +5

    Again, thank you Dave for this Next JS series. So far so good ...😍🤩

  • @okonkwo.ify18
    @okonkwo.ify18 ปีที่แล้ว +1

    I almost hurt my legs rushing to watch this new video. 😂

  • @L0kacitron
    @L0kacitron 7 หลายเดือนก่อน +2

    When implementing the 404 page logic in generateMetadata and the return of my JSX for the dynamic route to this instead of just checking !user.name. I tried reading the documentation since Im doing this with the latest version of next.js but I couldnt find out if there had been any changes to how this should be implemented. I had to make these changes.
    1. const user: User | null = await userData;
    2. (!user || !user.name) in the if statement
    Anyone that knows why?
    If I didnt make the changes I would either get an runtime error, or if I had an error page that would be thrown instead.

  • @matiasunknown6067
    @matiasunknown6067 ปีที่แล้ว +1

    Hi Dave! Thank you for this series of videos. Just a quick question, in 19:05, in line 4, that's an implicit return?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Oof! You got me there! I missed typing the return keyword. The return keyword is needed there. I will update the lesson source code. Thanks for the note!

  • @djelasrca8091
    @djelasrca8091 ปีที่แล้ว +1

    Truly amazing update. Next is a beast!

  • @vishalchaurasia96
    @vishalchaurasia96 ปีที่แล้ว +2

    Hi, Dave your way of teaching is awesome. Please consider Framer Motion as your next tutorial.

  • @shayanhdry6224
    @shayanhdry6224 ปีที่แล้ว

    Hello, what if in users route "not in [userid] route" you didn't use generatestaticparams method? as well as [userid] ?

  • @meetboy352
    @meetboy352 ปีที่แล้ว

    This is the content the Nextjs community needs!

  • @howieschecter8339
    @howieschecter8339 ปีที่แล้ว +15

    Hi Dave. Thanks for the tutorials. They're great. I had one problem however. In the page.tsx file in the [userId] folder, I got an error checking for user.name. This happens because now undefined is being returned in getUsers. Changing it to if (!user) worked and it then ran.

    • @Will-ep2pr
      @Will-ep2pr ปีที่แล้ว

      Thanks for this. I was having the same error just now.

  • @dawid_dahl
    @dawid_dahl ปีที่แล้ว

    Hello, Dave! One question, in the Next docs it is said that: ”During revalidation (ISR), generateStaticParams will not be called again.”
    Does that contradict what is said in this video?

  • @okonkwo.ify18
    @okonkwo.ify18 ปีที่แล้ว +1

    I am still trying to rap my head arround SSG. I understand it but what if /users keeps changing due to more users being added ? How does Next js handle that ?
    If the answer is to turn it to ISR, how does that work in this case, since the page has already being generated statically at build time

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      ISR uses a revalidate value. When revalidation is triggered, the data is fetched again. The new pages available from new data will be SSR until the site is built again and the build uses generateStaticParams which will then create SSG pages for new data. Later in this series, we take a deeper dive into Revalidation, the settings, exactly how it works and how to do it on-demand.

    • @okonkwo.ify18
      @okonkwo.ify18 ปีที่แล้ว

      @@DaveGrayTeachesCode ok thank u. I get it now .

  • @midoone188
    @midoone188 ปีที่แล้ว

    Great content, i have a question
    I added
    export const dynamicParams = false;
    To page.tsx or layout.tsx of [userId] folder
    But when i try param that not returned by generateStaticParams function, it doesn’t return 404 page ?!

  • @carlandres3319
    @carlandres3319 ปีที่แล้ว +1

    Thank you very much Dave for this another great video to learn Nextjs 🙏💯

  • @factzfactory4956
    @factzfactory4956 5 หลายเดือนก่อน

    Sir, I am using the next js in my project and the project size is huge
    In the hero page of the project there are a lot of components that fetch data from db using SSR
    due to it when I open my Website the first fetch gets 17.8kb of data and documents approx in 22sec which is too huge and vercel only allows 10s for page fetch
    I don't know how to solve this
    I'm fetching all the data on the server side which is causing the problem
    Pls help

  • @joaoarthurbandeira
    @joaoarthurbandeira ปีที่แล้ว +1

    Hey Dave, great video! I have a question, how could i do cache, ISR and SSG with RTK query?

  • @MOJICA7257
    @MOJICA7257 ปีที่แล้ว +2

    Thanks Dave!
    For another Great content!

  • @bobyuan5475
    @bobyuan5475 ปีที่แล้ว +1

    Hi David, I cannot get not-found.tsx working, it threw error: error - TypeError: Cannot read properties of undefined (reading 'name') in the console log, did I miss anything? I checked your code, it looks the same, thanks.

    • @bobyuan5475
      @bobyuan5475 ปีที่แล้ว +1

      No worries, I found I missed a function bracket. thanks anyway😀

  • @odincreek
    @odincreek ปีที่แล้ว +23

    Hi Dave, thanks for your high quality content.
    Is there a possibility to create a NextJS 13(app folder) jwt auth setup using tanstack query and zustand based on the backend you've made in the past. I think redux is overkill, and would be great to see it in action, there are literally no videos explaining these 2 techs.
    Upvote if you agree :))
    Thanks in advance Dave!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +4

      Nice little dose of upvotes! There is a possibility for this although it might not be best included in the "beginners" series. It could make a nice follow up that is a bit more advanced.

    • @annssarr
      @annssarr ปีที่แล้ว +2

      @@DaveGrayTeachesCode Also, it would be very cool if you show how to fetch those datas using RTK query and how to handle SSR and SSG with that tool.

  • @stillready6405
    @stillready6405 ปีที่แล้ว

    Hey @@DaveGrayTeachesCode or anybody who knows the answer. I'm struggeling with SSG and the build/export process. I managed to generate the "out" folder by adjusting the next.config file. Since version 13.4 or so, you don't have to include a "export" script in the package.json, you do it via the config file. My question is. The only reason for SSG is to deploy the site as a static one, or am I missing something? My idea was to deploy a static website (SSG with NextJs), on my server which does not support NodeJs.
    Why I'm confused: When the topic SSG is talked about, I would expect to see where my static files are generated (in which folder etc.). I remebered from older NextJs versions that the "out" folder was created automatically after the "build" process and when I started to get into NextJs again I was confused about that part (beside other changes aswell). Therefore I was searching for TH-cam videos and documentations regarding that.
    All that said, I liked that video very much!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      Thank you - Yes, you are discussing two different concepts / approaches here. You can learn about starting with a static site at the following link but note the unsupported features listed near the bottom of the page: nextjs.org/docs/app/building-your-application/deploying/static-exports
      Using SSG and generating static params is a different approach that the static export described at the link above and both dynamic routes and ISR would not be supported.

    • @stillready6405
      @stillready6405 ปีที่แล้ว

      ​@@DaveGrayTeachesCode Thank you for the answer and link to the docs. Is there any reason for me to not just export a static site with SSG, when I'm not using those features listed. Although I would like to use the Image API, which is kinda sad. What other way would you recommend for image optimation without SSR? Is there a way for me to utilize WebP images?

  • @aurobindobhuyan2107
    @aurobindobhuyan2107 11 หลายเดือนก่อน

    In Next.js 12 I remember if we use ISR, after the build it shows that the particular page is using ISR mechanism, but in Next.js 13 it doesn't show any message like that. Is there any way we can know that a particular page is using the mechanism of ISR. or am I missing something?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  11 หลายเดือนก่อน

      You will possibly use ISR with SSG pages. The time increment will let Next.js know when to invalidate the cache. A request _after_ time has expired triggers the revalidation. Therefore, stale-while-revalidate applies. The first request beyond time gets stale data but triggers the revalidation. When revalidation completes, fresh data is provided.

  • @zaynelovecraft
    @zaynelovecraft ปีที่แล้ว

    If the root layout has a fetch request that is not cached in any way, meaning the root layout component is re rendered on the server for every request. Does this mean that now all my pages will behave like server side rendered? Even if I am caching data and re validating the request every 5 mins at the page level. This will get over ridden by the root layout component that requires and re render every request? Or does next js know how to cache all request that are made depending how you cache them?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      Interesting question. I have never found a need to request data in the root layout component. You might want to in the root page instead. It would not impact the other route segments.

    • @zaynelovecraft
      @zaynelovecraft ปีที่แล้ว

      @@DaveGrayTeachesCode but it's in the navbar. And the nav bar wraps all routes in the root layout

  • @DhairyaMajmudarIIITKota
    @DhairyaMajmudarIIITKota ปีที่แล้ว

    Thank you so much Sir for such videos 😊
    Respect from India

  • @rastapoile
    @rastapoile ปีที่แล้ว

    Hi Dave,
    Is there any point in storing the promise (const usersData: Promise = getAllUsers();) and then waiting for it (const users = await usersData;)
    Why not just do : const users = await getAllUsers(); ?
    Thank you!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      Yes: beta.nextjs.org/docs/data-fetching/fetching#parallel-data-fetching

  • @holderchannel4393
    @holderchannel4393 ปีที่แล้ว

    Hi Dave, I have a question regarding the users page. The /users page is shown as a SSG page when you run npm run build and I do not understand how can the static page be updated when the users data is changed on the backend since users page is only built one time and is cached in the server to be reused. Thank you!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      This is where ISR comes in. Incremental Static Regeneration based on a revalidation time. This video shows and explains some of that. A later video in the series takes a deeper dive into revalidation. Keep going! 🚀

    • @holderchannel4393
      @holderchannel4393 ปีที่แล้ว

      @@DaveGrayTeachesCode Thank you!

  • @mrfran1
    @mrfran1 ปีที่แล้ว

    What If there is a mutation (prior to the 60 secs) to the author posts array or individual post (CRUD), does SSG/ISR handles the data revalidation?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      "Prior to the 60 seconds..." No. That is the time you set. Also note, if SSG it is static so you won't see changes after the 60 seconds unless you refresh. If you stay in the app, you will see a cached version by default unless you set cache on fetch to 'no-store'. These strategies are good for data that doesn't change often or need to immediately reflect changes.

  • @ttirasx
    @ttirasx ปีที่แล้ว

    great follow up tutorial, looking forward...👊

  • @zunnoorainrafi5985
    @zunnoorainrafi5985 ปีที่แล้ว

    When I click on "users" all users are fetched at once but when I click on a single user like "Leanne Graham" then this fetch again , I don't know why this is happening though I also match my code with your code but still I am getting this re-fetching problem and also instead of getting not-found or 404 page when user.name not found , I am getting 500 internal server error.
    Please give me a suggestion to solve this problem.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +2

      If you just created your project, it has version 13.3 which still has bugs. Type npm I next @13.2.4 in your terminal to install that version. Then see which problems remain.

    • @zunnoorainrafi5985
      @zunnoorainrafi5985 ปีที่แล้ว

      @@DaveGrayTeachesCode okay thanks

    • @DocRamadani
      @DocRamadani ปีที่แล้ว +1

      You can use "if (user == undefined)" instead of "if (!user-name)"

    • @sayf3446
      @sayf3446 ปีที่แล้ว

      @@DaveGrayTeachesCode This actually helped me experience the difference (which is really amazing to see!), as I was first on 13.3 - thanks! Please keep up with the amazing content!

    • @MichaKurzewski
      @MichaKurzewski ปีที่แล้ว

      @@DaveGrayTeachesCode yes i cofirm too. started yesterday, everything was going well untill build for SSG. rollback solved this.

  • @CuriousAnonDev
    @CuriousAnonDev ปีที่แล้ว +1

    All this is kinda confusing
    So basically, server components run only on server and if we use client side things like hooks/events then we need to us client components
    and everything is SSG but when dynamic routes are used, it is SSR, which we can convert to SSG if we provide params in advance
    if data changes frequently, we can use ISR by using revalidating option in fetch()
    Am I right?

  • @weekendcode
    @weekendcode ปีที่แล้ว

    hello. Dave. Thanks for your great content.
    By the way. I'm having serious problem with images.
    I've created a website by building in SSG(in config file, output: "export"), but it keeps failing to find the path to the image. It works in dev mode, but when I build it and generate it as html, it can't find the image paths. What should I do in this case? All my images are in the public folder, and my next.js version is 13.3...

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      I'd consider going back to 13.2.4 to see if it works there. Still some bugs in these beta versions.

  • @nerdshow247
    @nerdshow247 ปีที่แล้ว

    Hello, please help. I can't figure out if I'm thinking right in this situation ->. There is an article for whatever it is - it will be static and server. But she has comments, I have such a template in my head, please rate it. I can render these comments as dynamic and client-side components, using RTK-query to take advantage of all the goodies of RTK-query. Or is ISR better?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      RTK Query is only client-side. ISR may be more beneficial.

    • @nerdshow247
      @nerdshow247 ปีที่แล้ว

      Yes, but with RTK-query it's easy to do an optimistic update, let's put an emoji on a comment. And with ISR, this will have to re-render the whole page, which is better in this situation, thanks in advance.
      You help me a lot, in addition to reading the documentation, I only watch you and another TH-camr

  • @rebazjabar7660
    @rebazjabar7660 ปีที่แล้ว

    Thanks alot for a series video about Next.js

  • @sewerynwozniak3417
    @sewerynwozniak3417 ปีที่แล้ว

    on line: if(!user.name) I got error:
    Cannot read properties of undefined (reading 'name')
    I have no idea why, I copied your page from github but it's the same🤔

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Sounds like your user value is undefined. It shouldn't be happening, but you'll want to find out why it is. At the same time, using optional chaining like user?.name can prevent that... but other errors may follow.

    • @barmaglot9496
      @barmaglot9496 ปีที่แล้ว

      @@DaveGrayTeachesCode what he meant was in "...if (!user.name){return notFound}" Next gives now "Cannot read properties of undefined (reading 'name')" instead of 404Page....Now it wants if(!user)

    • @stevereid636
      @stevereid636 ปีที่แล้ว

      But it’s supposed to throw an error if user is undefined and you try to coerce the non existent name prop. How did it work in the video!?!

  • @tdoc666___
    @tdoc666___ ปีที่แล้ว

    Why and what does it mean when we use Promise or Promise ?? you know i can't get it...

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      You need the recommended TypeScript prerequisite course: th-cam.com/video/gieEQFIfgYc/w-d-xo.html You will learn about the return types and much more in that course.

  • @_techbk
    @_techbk ปีที่แล้ว

    Hi Dave,
    quick question, which theme are you using for your icons in vscode ?

  • @okonkwo.ify18
    @okonkwo.ify18 ปีที่แล้ว

    Something am trying to understand Dave. generateMetadata async function returns a promise. But it’s already awaited inside the function so it should just return the metadata object but this is not the case. I wonder why

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      When I write a function in Vanilla JS, I usually not only _await_ the response, but then I also _await_ response.json() before I return ...looking at the docs example, that 2nd await isn't really happening so a promise is being returned (as we indicate with TypeScript). We also didn't use the await on the fetch but instead of a separate line. Reference: beta.nextjs.org/docs/api-reference/metadata#generatemetadata

  • @licokr
    @licokr ปีที่แล้ว

    Thank you very much, it was the eaiest explanation!

  • @dusanlukic6784
    @dusanlukic6784 ปีที่แล้ว

    Hi @Dave Gray thanks for great tutorial. Until this video I had no problems in my code, but when I tried know to create not found page, in console I'm getting error which said: cannot read properties of undefined (reding title // api is different so please don't matter about property name in you case it is name). Do you know maybe how to solve this, every line of code is like yours?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      You can use diffchecker.com to compare your code to mine. If the result is different, not every line is the same.

    • @Fr4n006
      @Fr4n006 ปีที่แล้ว +2

      try to change "if(!user.name)" to "if(!user)"

    • @reniadd5654
      @reniadd5654 ปีที่แล้ว

      @@Fr4n006 (!user || !user.id) - only this worked for me ;)

    • @SoraAkino
      @SoraAkino ปีที่แล้ว +1

      @@Fr4n006 , Tnx, it's helped!

  • @kazinoman3039
    @kazinoman3039 ปีที่แล้ว

    God bless you sir. I really appreciate for you valuable effort.

  • @mohdsuhailmasroor6398
    @mohdsuhailmasroor6398 ปีที่แล้ว

    Hello Dave waiting for the vedio👍

  • @HossamKhalaf-sr1oo
    @HossamKhalaf-sr1oo ปีที่แล้ว

    Thanks ❤️ always clear explanation

  • @spencerbigum1309
    @spencerbigum1309 ปีที่แล้ว

    HI Dave, I came across this page looking for a solution to build my blog going headless combined with wordpress DB. I have over 700+ blog posts though so I don't think I would want to statically generate them each time I release a new post each week. Would that method you proposed for ISR in your video be the way to go? DO you have any examples or tutorials I can follow to make this happen? Thanks so much for the great video!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      I don't have a tutorial in this series with a CMS, but you do have the right idea with ISR. I think the Next.js site explains it well here: nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      A comment on a recent video - the blog project one in this series - brought your question back to my mind. Colby Fayock has a great article on what you are asking about: spacejelly.dev/posts/how-to-update-static-content-in-next-js-automatically-with-incremental-static-regeneration-isr/ ...also the solution the other viewer had was to use this: beta.nextjs.org/docs/api-reference/segment-config#revalidate

    • @spencerbigum1309
      @spencerbigum1309 ปีที่แล้ว

      @@DaveGrayTeachesCode Dave can't thank you enough for looking this up. I did find Colby's repo a few days ago but the segment-config I had not seen yet! Looks like some really new stuff is coming down the pipeline from Next.js!

  • @narenk8077
    @narenk8077 ปีที่แล้ว

    Thanks Dave for sharing information but one general question how we can remember all concepts in different technologies? Any suggestions

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +2

      I look things up every day. I remember an idea or overall concept, but I don't memorize everything. Einstein said "Never memorize something you can look up." and I completely agree with that.

    • @anonymous-vg3xj
      @anonymous-vg3xj ปีที่แล้ว +1

      @@DaveGrayTeachesCode yeah and in the era of chat gpt it is much more easier. 🤓

  • @rayhanislam7518
    @rayhanislam7518 ปีที่แล้ว +1

    I think you can explain them morre efficiently with your own server. like we know ssg serve the data what it build in the build process. Can you suggest me what is the best way for a news app where we fetch a tons of data everyday?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      We have a development server running here, so I don't understand your comment? A site with frequent new data would likely rely on SSR with ISR mostly. It all depends on site structure and needs. Maybe you have a page that is mostly SSG but one component needs to be SSR. Many possibilities.

  • @SL4UGHT3R
    @SL4UGHT3R ปีที่แล้ว

    Great explanation as always.

  • @alapottrachakma4706
    @alapottrachakma4706 ปีที่แล้ว

    "Creating an optimized production build .TypeError: Found invalid object in transferList" anyone having this error while building the app after implementing SSG?

  • @sahadevdahit
    @sahadevdahit ปีที่แล้ว

    Love from Nepal 💕💕💕

  • @TravinskiyVladislav
    @TravinskiyVladislav ปีที่แล้ว

    Thank you Dave, awesome

  • @stevereid636
    @stevereid636 ปีที่แล้ว

    What am I missing? If user is undefined, there’s no name property. If it’s not there JavaScript can’t check if it’s falsy! It’s supposed to throw an error! How is it returning the not found page for you!?!
    You also mention an empty object when setting up the notFound(), where is that empty object coming from when you are returning undefined!?!🤷🏾‍♂️

    • @k303k
      @k303k ปีที่แล้ว +1

      you can check with if(!user) instead of (!user.name)

  • @Kevin-hk4fv
    @Kevin-hk4fv ปีที่แล้ว +2

    SSG is so cool! Great lesson as always :)

  • @alexanderkomanov4151
    @alexanderkomanov4151 ปีที่แล้ว

    Thanks Dave!

  • @dawid_dahl
    @dawid_dahl ปีที่แล้ว

    Thank you! 🙏🏻

  • @abdulrahmanagboolaosho3582
    @abdulrahmanagboolaosho3582 ปีที่แล้ว

    Next JS is so cool

  • @johanmirzaahmedov7987
    @johanmirzaahmedov7987 ปีที่แล้ว

    Hi Dave! thanks for great tutorials, I just wanted to ask you if you could consider Prisma as follow up tutorial for nextjs. Thanks

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      I think that is a good idea! It should be a separate video focusing on that, but I could bring them together in the future, too.

  • @k303k
    @k303k ปีที่แล้ว

    so far so good

  • @rohitsingh-xj1ey
    @rohitsingh-xj1ey ปีที่แล้ว

    Thank you sooo much 😀

  • @iUmerFarooq
    @iUmerFarooq ปีที่แล้ว

    I joined your Discord server. Will you make course on Nuxt?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Welcome aboard! Not soon, but thank you for the request!

  • @eliasvasques80
    @eliasvasques80 ปีที่แล้ว

    Now I understand that.

  • @seyhaphan7319
    @seyhaphan7319 ปีที่แล้ว

    how about axios with SSR

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +2

      You could make server-side requests with axios, but Next has extended fetch to work with their caching system. On the client side, they recommend SWR or React Query.

    • @seyhaphan7319
      @seyhaphan7319 ปีที่แล้ว

      @@DaveGrayTeachesCode Thank you

  • @inteliconn995
    @inteliconn995 ปีที่แล้ว

    Thanks!

  • @desgnify
    @desgnify ปีที่แล้ว

    Thank you soo much sir. But I am get error if i try to add the 404 error . 😂😂😂😂 i

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      First thing I would do is roll back to version 13.2.4 for now just in case this is an issue with the newly released 13.3. In your terminal window: npm i next@13.2.4 ...if the error persists, compare your code to my code in the course resources. If you don't see a difference, use a tool like diffchecker.com

  • @hamzaashraf9529
    @hamzaashraf9529 ปีที่แล้ว

    Yeah it's seems little confusing as i'm very next js but i will watch again and try again to understand

  • @teflonhav
    @teflonhav ปีที่แล้ว

    wonderful

  • @zunnoorainrafi5985
    @zunnoorainrafi5985 ปีที่แล้ว

    nice sir

  • @javascript-shorts
    @javascript-shorts ปีที่แล้ว

    Maybe you should type Id always as string and never use id defined as number?

  • @mrTiberiuDubau
    @mrTiberiuDubau ปีที่แล้ว

    cool!

  • @anime-dx4tz
    @anime-dx4tz ปีที่แล้ว

    Next video plzz

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Next.js videos publish each Friday while I'm building this series.

  • @psyferinc.3573
    @psyferinc.3573 ปีที่แล้ว

    epic

  • @davidrowlands8548
    @davidrowlands8548 ปีที่แล้ว

    if(!user.name) didnt work for me but if(!user) did

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      If you get an empty object value for user, your if (!user) check won't work.

    • @mcauliffe99
      @mcauliffe99 ปีที่แล้ว

      @@DaveGrayTeachesCode
      I had the same problem but I used the `optional chaining` operator instead `if (!user?.name)`