Next.js Building a Car Trader App #6: Improved pagination with SWR + Car Cards with Material-UI

Опубликовано: 22 Май 2020
на канале: Bruno Antunes
13,473
313

In this video, we will use getServerSideProps together with SWR to improve pagination performance. We will use Material-UI cards in order to display the car's list. At the end of the video, we will touch briefly in the Nextjs Head component in order to improve SEO.

I hope you have enjoyed this series =)

From Next.js documentation:
When should I use getServerSideProps?
You should use getServerSideProps only if you need to pre-render a page whose data must be fetched at request time. Time to first byte (TTFB) will be slower than getStaticProps because the server must compute the result on every request, and the result cannot be cached by a CDN without extra configuration.

If you don’t need to pre-render the data, then you should consider fetching data on the client-side using SWR.

----
SWR Video:    • React Hooks SWR: Fetch, Cache and ReV...  
----
Github Repository: https://github.com/bmvantunes/youtube...
----
Github serverQuery commit: https://github.com/bmvantunes/youtube...

I did some small improvements in the repository. Please, have a look into the commits after "final part6" if you want to see all the improvements =)
----
Forwarding Refs:https://reactjs.org/docs/forwarding-r...
----
Follow me on:
Twitter:   / bmvantunes  
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
Github: https://github.com/bmvantunes
LinkedIn:   / bmvantunes  


Смотрите видео Next.js Building a Car Trader App #6: Improved pagination with SWR + Car Cards with Material-UI онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Bruno Antunes 22 Май 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 13,473 раз и оно понравилось 313 людям.