I struggled to understand between getStaticProps and getServerSideProps, watched a few videos but still didn't get it until yours. Greatly explained thanks 🙂
I was running on local environment where site builds on every refresh so got really confused between the getStaticProps and getServerSideProps. Now it’s clear thanks to this video. Also the explanation of getStaticPaths was very good with easy to understand examples. Great work👏🏻👏🏻
Thank you for the great explanations/demonstration/illustrations of data fetching, I am very glad to understand the differences between getServideSideProps and getStaticProps, the mongodb example is awesome for us to understand the differences between these two functions. Thank you so much !!!
Really helpful thank you! By the way, next time set the sound properly cause I have to push the volume up to hear, lol. We need more next js tuts like this one.
very usefull tutorial! This helped me more than the explanation of my college professor. Thanks man, you should upload more videos like this! New subscriber. you got some potential
Was really confused about getStaticProps and getServerSideProps as it was doing the same thing. This really helped. Is it mentioned some where in the docs?
one question about the getStaticProps and unstable_revalidate. You mentioned that it gonna update every second or every 10 mins (depending on what you set). Does that mean it can work as setInterval? I am trying to do make a cryptocurrency ticker, where I want the currencies will update every 5 seconds, so I am making api calls every 5 seconds using useEffect and setInterval. I wonder if I can make the function using getStaticProps
I have a question what if we set the callback to true and we typed in an id in the URL that doesn't exist in the database how can we handle this situation?
Great Video! Just had a question : Is there any benefit to making fallback false? It looks like its just going to error out any new pages for new data that will be added in the future based on the video to me.
i'm a bit confused, then what is the difference between using only the useEffect hooks to fetch data and the getServerSideProps() ? can someone pls explain
is there any way the I can pass information from getStaticProps to getStaticPaths so the app doesn't have to do 2 request getting the same information??
Ok, so if i use the "getStaticProps " and "getStaticPaths", and build the app, and deploy it, ... and every time , something changes in the database, i gonna have to rebuild the app and deploy again ?...this kind of confusing.. 🤔
Hi Ado, cool your channel :) i have a question: i'm working a fullstack app with Next js and a headless cms as backend restfull api. I need to handle logout user with jwt in cookie httponly (server side - not access in client side). what approach do you recommend about to implement logout user? what is the simplest and fast solution?
Hi Berlino, that's a great question. For all things authentication and authorization I usually prefer to defer things to Auth0. They have a really good Next.js library (github.com/auth0/nextjs-auth0). But if you're rolling your own solution, I would just create an API route in Next.js to handle that logout call. In Next.js API routes you have full access to the request object so can destroy the cookie there thereby logging the user out. Let me know if this helps!
Can you do a tutorial on handling concurrent clients? For example if I'm on a page /item/:id where id=1 and another user deletes that resource from the DB, what should happen to me as a user while I'm on that stale page? What if two users are mutating an object at the same time?
I'm going crazy with this lol... NextJS was so easy until now xD how can I get a query from the user and then run this query fetch in server-side? My API key cannot be exposed =(
so if facebook has 1 billion post so their backend has to query for 1 billion post id then frontend has to call an api to get that 1 billion paths. It sounds wrong for me
If they wanted to pre-render all of that content, then yes, but they're unlikely to want to pre-render all of it ahead of time. With Incremental SSR though, those pages can be generated when they are requested and still served statically.
probably the best explaination for data fetching capabilities of Nextjs...great work
Great explanation! Had a hard time understanding the difference of these 3 from reading the docs, this helped alot! Thanks!
best explanation with real example, this is what I need in every tutorial
Best explanation available on the internet!!
I struggled to understand between getStaticProps and getServerSideProps, watched a few videos but still didn't get it until yours. Greatly explained thanks 🙂
Great to hear!
You nailed it Ado. Clear explanation with examples. Please Keep making videos.
Thank you :)
I was running on local environment where site builds on every refresh so got really confused between the getStaticProps and getServerSideProps. Now it’s clear thanks to this video. Also the explanation of getStaticPaths was very good with easy to understand examples. Great work👏🏻👏🏻
Thank you for the great explanations/demonstration/illustrations of data fetching, I am very glad to understand the differences between getServideSideProps and getStaticProps, the mongodb example is awesome for us to understand the differences between these two functions. Thank you so much !!!
Man, you are awesome. Was trying to understand these three data fetching methods for so long. Thanks!
Great Explanation. I really wanted a detailed video like this
This really cleared out some of the confusions. Thanks for the explanation. Appreciate it.
This video is short and complete.
Thanks for sharing!!
very straight and practical explanation ! Awesome
Love it. Keep up the good work!
the best explanation in all youtube, thanks ado, it helped me a lot !
Really helpful thank you! By the way, next time set the sound properly cause I have to push the volume up to hear, lol. We need more next js tuts like this one.
The best explanation I have seen on this, thanks!
your explanation was amazing ! please keep posting these videos :) great work
Thank you, your explanation and demo was awesome and fully clarified how these concepts work
Straightforward, Hands-on, Great explanation. Thanks buddy and keep going and I just subscribed .
Very well explained cleared my confusion thanks man 👍
Very excellent explanation!
Beautifully explained
very usefull tutorial! This helped me more than the explanation of my college professor. Thanks man, you should upload more videos like this! New subscriber. you got some potential
Wonderful explanation! Thank you so much for making this video!
Thank you, this was an excellent explanation!
Thank you very much, it's really helpful for me! Please create more next.js videos
More to come! Anything specific you'd like to see?
Great explanation. It really helped me grasp it properly. Thank you!
Great video, great explanation Thank you so much
Was really confused about getStaticProps and getServerSideProps as it was doing the same thing. This really helped. Is it mentioned some where in the docs?
Very well explained all the concepts.
You save my day... thanks brother...👍👍
Great great explanations. Thank you so much for this, very grateful
Glad it was helpful!
Thank you for so useful video, really appreciate that.
Greatly explained. Thank you!
one question about the getStaticProps and unstable_revalidate. You mentioned that it gonna update every second or every 10 mins (depending on what you set). Does that mean it can work as setInterval? I am trying to do make a cryptocurrency ticker, where I want the currencies will update every 5 seconds, so I am making api calls every 5 seconds using useEffect and setInterval. I wonder if I can make the function using getStaticProps
Well done and very informative
Man....your are awesome....for real....!!
Hvala Ado olaksao si mi zivot :D
I have a question what if we set the callback to true and we typed in an id in the URL that doesn't exist in the database how can we handle this situation?
Great Explanation
Thanks for the video. I learned a lot of things. 👍
Very well explained, Thanks Ado
Thanks for the video.
Pretty useful.
Awesomeeeee Explanation.
Very well explained.
Glad you liked it
Great video ! Keep it up !
Thanks!
Thanks bro very clear and understandable. How about handling form submit and storing the data?
Much neat and precise! thanks 🙏🏼
really helpful.😊😊😊
Thank you for such great explanation
Glad it was helpful!
One suggestion: the audio was quite low -- it would be helpful to normalize it to a higher volume. Otherwise, a great video - thanks!
does node js express server runs under the hood to constantly fetch data and serve it in getservsideprops method?
Great Video! Just had a question :
Is there any benefit to making fallback false? It looks like its just going to error out any new pages for new data that will be added in the future based on the video to me.
Honestly great video
how to revalidate in getserversideprops?
Great stuff! More nextjs videos 👍
I think in new version nextjs provided revalidate instead of unstable_revalidate. Right ?
right
I love this video. Thanks
Awesome explanation, thank you
Wow! This video was really helpful for me. Thank you!
Thanks! Very good explanation!
i'm a bit confused, then what is the difference between using only the useEffect hooks to fetch data and the getServerSideProps() ? can someone pls explain
is there any way the I can pass information from getStaticProps to getStaticPaths so the app doesn't have to do 2 request getting the same information??
Nicely done - thank you for your time!
My pleasure!
can you put link to the github repository? I would like to take a look on your function for data fetching
Awesome video!
Thanks! Wery clean explanation 🤗
Hvala ti Ado! :)
Really nicely broken down, thank you so much :)
Why do you compress lines of code? How can a viewer understand the context of the code if you got lines compressed / hiding.
so correct me if I'm wrong here but do these fetch methods mean you don't have to rely on useEffect?
This is really awesome, can you also make a video about hooks
Thanks so much. This was really helpful
very good explanation thank you!!
Hii there, I have a question .. What if the data fetching takes time ? would gSSP hold the page rendering or will empty page will appear?
Ok, so if i use the "getStaticProps " and "getStaticPaths", and build the app, and deploy it, ... and every time , something changes in the database, i gonna have to rebuild the app and deploy again ?...this kind of confusing.. 🤔
Keep It Up ❤️
Great video. Subscribed!
Great explanation mate, is the demo project open source ?
Great content! Liked & Subscribed
Awesome, thank you! Much appreciated!
Very useful. Subbed
Nice Video. Can you add more info on incremental static regeneration?
Hey Dushyant, yes I will create a video on it next week!
Made it: ua-cam.com/video/IJkTpR7sSwI/v-deo.html :)
Hi Ado, cool your channel :) i have a question: i'm working a fullstack app with Next js and a headless cms as backend restfull api. I need to handle logout user with jwt in cookie httponly (server side - not access in client side). what approach do you recommend about to implement logout user? what is the simplest and fast solution?
Hi Berlino, that's a great question. For all things authentication and authorization I usually prefer to defer things to Auth0. They have a really good Next.js library (github.com/auth0/nextjs-auth0). But if you're rolling your own solution, I would just create an API route in Next.js to handle that logout call. In Next.js API routes you have full access to the request object so can destroy the cookie there thereby logging the user out. Let me know if this helps!
Nice one !
thank you it helps a lot!
Good job man
Great tutorial!
Where is the code to help us follow along?
Quality content. Just gotta work on editing a little bit :)
Thanks! yeah it's a work in progress :)
Nice! Actually took something away from the video!!
uhh how is data being passed from props to ur component? u didn't show that at all
Thank You!
Nice gb music 🎺
Can you do a tutorial on handling concurrent clients? For example if I'm on a page /item/:id where id=1 and another user deletes that resource from the DB, what should happen to me as a user while I'm on that stale page? What if two users are mutating an object at the same time?
Hey Malik - that’s not a bad idea. I’ll create a video on it next week. :D
@@ado hey,can you explain me
How to import that "fetchGraphQLQuery" in nextjs
I'm going crazy with this lol... NextJS was so easy until now xD
how can I get a query from the user and then run this query fetch in server-side?
My API key cannot be exposed =(
Thanks!!!
so if facebook has 1 billion post so their backend has to query for 1 billion post id then frontend has to call an api to get that 1 billion paths. It sounds wrong for me
If they wanted to pre-render all of that content, then yes, but they're unlikely to want to pre-render all of it ahead of time. With Incremental SSR though, those pages can be generated when they are requested and still served statically.
thank you
thank u