Build a Pokedex with NextJS and Tailwind CSS - SSR vs SSG
HTML-код
- Опубликовано: 25 авг 2024
- NextJS is a powerful framework built on top of React that allows you to easily mix Static Pages and Server Side Rendered pages. In this video, we'll use NextJS to build a cool Pokedex using the Pokemon API. The index page will be a statically generated page while the Pokemon details pages will be server-side rendered. We'll also use Tailwind CSS for styling the app.
Source Code - github.com/jam...
Setting up Tailwind in Nextjs - dev.to/notrab/...
_____________________________________________
Newsletter 🗞
Interested in exclusive content and discounts? 🤯 Sign up for the newsletter!
www.jamesqquic...
_____________________________________________
Connect with me 😀
Live streams on Twitch - / jamesqquick
Follow me on Twitter - / jamesqquick
Join the 💬 Discord Server 💬 - / discord
_____________________________________________
COURSES 💻
Learn how to build Fullstack apps with React and Serverless Functions - www.jamesqquic...
Learn everything you need to know about Visual Studio Code - www.udemy.com/...
Build a Quiz App - www.udemy.com/...
Hate to break it to you James, but there are 151 OG Pokemon.
But real talk this was incredibly cool/helpful.
Keep up the awesome content!
Haha great clarification. Thanks for checking out the video!
The moment you said "pokeMAN" as for the singular form of pokemon you lost me and I lost hope for all mankind.
Just kidding. This is a great tutorial.
Haha thanks!!
Wow, this made me realize how powerful Next.js is. Thank you.
It’s awesome!!
Let me know if you enjoy the demo and make sure to check out the source code - github.com/jamesqquick/nextjs-pokedex-with-tailwind-css
Thank you! I learned TaildwinCSS on NextJS, also you gave right example of how to render static content vs. dynamic content.
Thank you for the very fun and informational intro to NextJS. Just what I needed!
You explain things very nicely! Really makes it easy to learn new things. Btw, cute puppy! :) Cheers!
Thanks Sir... I love Your Tutorial.. simple and to the point
Glad to hear it!
Nice demo. I reckon the reason why we don't need to specify href on inside of might be that the `Link` component traverses children, checks if the child is , and assigns href to that child as an extra prop via `cloneElement`, so it saves us typing href on by ourselves.
Makes sense!
Thanks, James. I'm already a fan of your work! How about building some kind of simple e-commerce or food ordering app for the future? Would be great.
Great video, I would argue that static pages would be better for the individual pokemon. The first page is statically generated so the pokemon wont change on that page. You can also get pre rendering if you use static site generation which would speed up the app. None the less great video
My go to place to learn SSR technologies, i learnt SvelteKit from here nice to learn the basics of next as well.
Yay :)
Great video. Short, fun, and it covers just the things I needed to know.
Glad to hear it :)
Did anyone notice James' dog chillin on the sofaa
incredible example! love it
Awesome!!
Thanks, nice next.js tutorial
Dude, just follow the official tailwind docs to integrate next.js
Quick Question : when user scroll and cliked item with id 30 , then user reach details page (id 30) . Then user click browser back button to go HomePage and user have to scroll to id 30 . Any sugesstion ? I fix it by adding scrollRestoration in next.config.js .
Which should i use for stocks app, ssr or csr or ssg ? , data fetched will always be changing and i need the user to see changes without refreshing the page
Great video and beautiful dog 😁 You could also have named the 'pokemon' page to [pokemon] and dynamically change the URL name. Just by changing href like : /${pokeman.name}?id={index +1} instead of /pokemon?...
Yep very true!!
that same I was thinking
Great tutorial! One question, though. At 16:00 , I'm not sure why we need the anchor tag when we're already using Link.
Link in nextjs is similar to react-router, the difference is in the syntax...
Link requires anchor tag
25:30
You can write:
pokemon.types.map(({ type }, index) => {type.name})
To avoid type.type.
Notice {type}
Oh true good point!
Hi its possible to load a (holder image, progress, progres image) idk how said it. until the image(Pokemon) is fully loaded.
Because image load slower than the name.
I think the answer of this question is tag of nextjs that internally do lazy loading but I don't know why sir is not using in this video
Ajalas buen vidio
sir why are you not using tag of nextjs. I am saying that bcz you are using tag of html instead of tag
can u explain sir
This video came out before the image tag was available in nextjs :)
Why using SSR instead of getStaticProps for pokeman page? 🙂
You could do it either way. Just wanted to try ssr.
Thanks for creating this tutorial, it is a small but elegant project, I built this clone with Nuxtjs, because I feel it is very odd to write jsx, if anyone is interested in building this project with Nuxtjs, please check it out:
Github: github.com/stephenlaichaowen/pokedex-nuxtjs
Awesome! I haven’t spent a lot of time with vue yet but I know people love it!
🤗🤓
Thanks!
doggo