Learn how to build a full stack Next.js app in my upcoming course: colbyfayock.com/course
@jrs32393 жыл бұрын
The best tutorial ever on KZbin. Very well explained. Congratulations, your videos are awesome!
@colbyfayock3 жыл бұрын
Wow thanks so much
@mamadcodes Жыл бұрын
The best tutorial video about Fetching data in Next!!!!! it was a headache for me to understand how to to it, before this video !!!!
@colbyfayock Жыл бұрын
Really glad to hear it helped
@ArgzonHaziraj3 жыл бұрын
I like your videos a lot Colby, not just because you are very knowledgeable but you also have a very calming voice which I like a lot. Keep up the great work man
@colbyfayock3 жыл бұрын
Thank you so much 🙏
@pensums3 жыл бұрын
Next videos: How to [insert subject here] in NextJS - ASMR 😂 I agree though. The flow of his voice in his tutorials is very calming.
@colbyfayock3 жыл бұрын
@@pensums 😂 thank you
@kirksurber7262 Жыл бұрын
Great breakdown and done fast without wasting time. Thank you!
@colbyfayock Жыл бұрын
no problem!
@aakashkathait83282 жыл бұрын
this video is structured perfectly I've seen tons of videos on Nextjs data fetching but this one finally made it all clear... good work man
@colbyfayock2 жыл бұрын
Really glad to hear that, thank you!
@sageosoro17032 жыл бұрын
Best explanation on data fetching methods ever
@colbyfayock2 жыл бұрын
thank you :)
@israelaregbesola4670 Жыл бұрын
I love the structure of this video and how you're able to perfectly articulate things. Awesome awesome video.
@colbyfayock Жыл бұрын
thanks! glad to hear it was helpful
@jayhu60752 жыл бұрын
I am very glad to find your channel. You make every topic understandable. Many thanks.
@colbyfayock2 жыл бұрын
So happy to hear that!!
@goose29353 жыл бұрын
NextJS is awesome, thanks! Using it as I need users profile pages and some other data based pages to be SEO friendly. Great video!
@colbyfayock3 жыл бұрын
thank you! sounds like a perfect use case :D
@iluvsyphonfilter2 жыл бұрын
Awesome tutorial, I liked how you explained it step by step gradually increasing the complexity.
@colbyfayock2 жыл бұрын
Thank you! Glad it was clear 🙌
@urbanobaz3 жыл бұрын
This video is amazing! I definitely want to join your workshop after seeing this video. Keep sharing great content Colby. Thank you!!
@colbyfayock3 жыл бұрын
Thanks so much! 🙌🙌
@gregsofroni41402 жыл бұрын
Finally a channel with the proper info and great structure. Plus, I just love your flow!
@colbyfayock2 жыл бұрын
Thanks so much 🙏
@PiyushRaj-ij3dx2 жыл бұрын
Absolutely brilliant! This video was everything I was looking for to get a quick feel and understanding of nextjs. Thank you!
@colbyfayock2 жыл бұрын
thanks, happy to hear that! 🙌
@rwlc3 жыл бұрын
Holy hell. This is one of the best tutorials.
@colbyfayock3 жыл бұрын
Haha thank you!!
@paupang7813 жыл бұрын
You're awesome, Colby! Learned a ton from you
@colbyfayock3 жыл бұрын
thank you! 🙌
@joshmay95312 жыл бұрын
Love your vibe and art that goes into the videos :)
@colbyfayock2 жыл бұрын
thanks Josh!
@imonw3b2 жыл бұрын
Amazing tutorial! Thank you Colby! 👌
@colbyfayock2 жыл бұрын
you're welcome! :)
@the.harshil3 жыл бұрын
I am surprised why you don't have more subs!?❤️
@colbyfayock3 жыл бұрын
ah thank you :)
@adamjamiu67642 жыл бұрын
The reason why i loved this video is that you made use of my best anime movie
@colbyfayock2 жыл бұрын
💯💯💯
@franssiregar93372 жыл бұрын
Good explanation thanks for the video
@colbyfayock2 жыл бұрын
np!
@Technoholicplus3 жыл бұрын
nicely explained thank you.
@colbyfayock3 жыл бұрын
no problem!
@prodigymuj3 жыл бұрын
Super cool video! Thank you! I'd like to ask if the suggested text is Github Copilot? or is that something else?
@colbyfayock3 жыл бұрын
thank you! yes it was Copilot, i usually turn it off for videos though to avoid any confusion but missed that🙈
@romimaximus2 жыл бұрын
Awesome tutorial !!! but everytime i need to get data from a API, i have to use these "getStaticProps, getStaticPaths, and getServerSideProps" ?... or i also can use the "Fetch API or Axios" inside the client side, just like in regular React App ?
@colbyfayock2 жыл бұрын
you can certainly make clientside requests like a typical react app! each approach has different tradeoffs for the benefits and impact they provide. for instance, using those methods to request page data might help with SEO, where clientside may be unreadable because it requires a request after the page loads (googles getting better at that, but not everyone). just one example
@romimaximus2 жыл бұрын
@@colbyfayock Thank you very much for reply 😁👍
@Mufaqar3 жыл бұрын
Cool but how we can add pagination in next ?
@colbyfayock3 жыл бұрын
thanks - good topic idea, ill add that to my list!
@Tonbeans2 жыл бұрын
Any idea when to use getStatic vs getServerSide? I was thinking do I use getStaticProps to only load local files (e.g blogs) and use getServeSide for ALL of my api requests.
@colbyfayock2 жыл бұрын
i try to use getStaticProps whenever i can - it offloads any of the work to the compilation step rather than adding more time to the server request when the person is requesting the page
@pixelbakery3 жыл бұрын
Hey! Thank you for this. What if we don't want to use an external API but instead want to use a bunch of subpages?
@colbyfayock3 жыл бұрын
hey! so are you referring to manually creating a page one-by-one? or are you still hoping to dynamically create them? you can create any new file under pages as pages/my-page-name.js and you'll have it available at mysite.com/my-page-name otherwise the process should be similar for any dynamic creation, but you would make the request to whatever local source you have or use something like the npm module fs to read the files from the local directory
@sabrinalucianavieirapinto56022 жыл бұрын
Hi Colby, this is an awesome explanation, but I've been questioning me if is possible injecct a loading/loading page when using getStaticProps/getStaticPath and Dynamic routes, because my data current data is locally
@colbyfayock2 жыл бұрын
If I'm understanding correctly I think you would want to create an instance of state where you mark if your data is loaded or not and if not show a loading state. If it's not available during compilation that would likely mean the default state and page would be a loading page
@tomarew3 жыл бұрын
is Next JS suitable for updating html elements with local files monitored by a server ? e.g. update buttons with params of local JSON files in realtime.
@colbyfayock3 жыл бұрын
hey! Next.js uses React.js for manipulating the DOM like that and React would be suitable for something like that
I need to configure navbar in next.js, Navbar menu data is coming from CMS where menu can be added any time. can you tell me where i can call the CMS api to get the nav so i update automatically when CMS content changes. Tried solution: 1. calling getInitialProps on _app.js 2. creating HOC for _app.js both solution is not feasible . In 1st solution the static page optimization provided by next js is opt out In 2nd the data set to one time and not updated automatically when CMS data changed Help me on that
@colbyfayock2 жыл бұрын
there's currently not a better solution but it sounds like there's one on the way per Vercel
@littlejohnmusicnow2 жыл бұрын
Hi Colby, thank you for this very fine tutorial I tried to create a similar version by following your code only using products instead of avatars, but my code failed at products.map (is not a function) and products is not an array. Please help me to solve this problem. Thank you.
@colbyfayock2 жыл бұрын
hey thanks john. i would recommend debugging the request you're making that would make `products` available. you can add `console.log` statements inside of `getStaticProps` or any of the data fetching methods which will log out in your terminal
@littlejohnmusicnow2 жыл бұрын
@@colbyfayock Many thanks Colby for your help. I've managed to get past this problem now. Cheers, John
@GMERT3 жыл бұрын
Hello Colby. I want u to create photo gallery with the images in public folder on next.js please
@colbyfayock3 жыл бұрын
hey! i don't haev that exact example, but here are a few that might help you out: Responsive Grid of Products with CSS Grid - Ecommerce on the Jamstack kzbin.info/www/bejne/sKi1o358irakfa8 Next.js Image with Cloudinary - Blurred Placeholder Images Tutorial kzbin.info/www/bejne/pGi5lniEi7ahqrs How to Use the KZbin API in React to Add a Playlist to a Next.js App kzbin.info/www/bejne/boq6o6CQpLqMfdU
@GMERT3 жыл бұрын
@@colbyfayock Thanks for saving me. I have been on that for a full week. Youare the best. Please do you have another video of saving user form input with txt in a folder on a server?
@colbyfayock3 жыл бұрын
@@GMERT i dont have something like that, sorry :(
@CodexRahul3 жыл бұрын
How to fetch data from component file, and that component file import in main page. How? like- I will create a home component name is home.js in component folder, not in pages folder. And fetch data in home component file that home.js. And that home component import to main-page.js file which are located in pages folder as a main page. That time will get some error, Tht's says "map not define". How to solve this problem?
@colbyfayock3 жыл бұрын
you would have to make the request clientside with the current APIs. you can only use the Next.js data fetching methods on pages
@batumanav2 жыл бұрын
Thank youuuuu
@colbyfayock2 жыл бұрын
you're welcome!
@ABC-rd4sz3 жыл бұрын
Thanks bro for amazing video this help me alot but getServerSideProps not working on next export can you please help me
@colbyfayock3 жыл бұрын
Unfortunately it won't work because export will export the site to a static version where get ServerSideProps requires a server
@KaceyDodson2 жыл бұрын
Great tutorial. It's really helping me wrap my head around dynamic data in nextjs. I'm calling another api and getting a "___.map is not a function" error. The api i'm using requires an api key. Could anyone offer some advice? Thanks! xD
@colbyfayock2 жыл бұрын
i think _.map is lodash syntax right? whats the API you're calling?
@KaceyDodson2 жыл бұрын
@@colbyfayock Thanks for the reply. I'm calling the Opensea api
@colbyfayock2 жыл бұрын
@@KaceyDodson oh neat! i'm not super familiar with that world yet, doing anything interesting?
@theseanmodd3 жыл бұрын
Please do a NextJS GraphQL tutorial!!!!
@colbyfayock3 жыл бұрын
youre in luck :D kzbin.info/www/bejne/pam4gYuej5anb6s
@mrikea75772 жыл бұрын
You're great, you know that?
@colbyfayock2 жыл бұрын
thank you 🤗
@lilabajrami3 жыл бұрын
so you continued with the "bad hair day" lol
@colbyfayock3 жыл бұрын
😂 i accidentally deleted a clip from the beginning so had to re-record and just went with it
@walidedrissi1012 Жыл бұрын
great job man but u need to slow down a bit not everybody is a genius here 😅 and ya while im here. get a live bro !! I mean, u know the mistakes before they occur WTF man !!😂🤣✌
@colbyfayock Жыл бұрын
thats the editing magic 🪄😉
@colbyfayock Жыл бұрын
Get fresh tutorials and other free content straight to your inbox! colbyfayock.com/news
@loveomobude68262 жыл бұрын
So no one noticed the hair at the beginning?
@colbyfayock2 жыл бұрын
what hair 👀😂 i accidentally deleted a segment and didnt want to re-record the entire thing
@loveomobude68262 жыл бұрын
@@colbyfayock 😂..thought as much..still funny though😂