Mastering Next.js
Hey, everyone!
I've updated the course overview below to annotate which parts are up to date, which have changed, and what my new suggestions are. In my opinion, this is the ideal way to evolve this course. The videos will serve as a reference to a point in time, but newer additions to the framework make certain aspects much easier.
๐ข Up to date๐ก Outdated๐ด Do not recommend
Introduction
๐ฅ Watch Now (26:07)๐ข Here are my latest thoughts on the framework comparison๐ก This video mentions Image Optimization, which is now supported in Next.js
React Overview
I taught Class Components in 2019 for those still in the process of converting to React Hooks. In 2021, it's now standard to use React Hooks for all projects and I would recommend starting there.
๐ฅ Watch Lesson (21:01)๐ View Code๐ข Props & State๐ข Functional Components๐ข React Hooks๐ข ES6๐ข JSX๐ก Class Components
Developing Locally
๐ฅ Watch Lesson (9:49)๐ข next dev
,next build
, andnext start
๐ข Prettier๐ก Image Optimization is now supported in Next.js๐ก ESLint is now integrated in Next.js๐ด Standard (Prettier + ESLint won)
Navigating Between Pages
๐ฅ Watch Lesson (19:25)๐ View Code๐ข next/link
(client-side routing)๐ข useRouter
๐ข Retrieving data from URLs๐ก getInitialProps
โ This has largely been replaced by newer APIs
Styling
๐ฅ Watch Lesson (20:04)๐ View Code๐ข Responsive + Mobile-First Design๐ข styled-jsx๐ก CSS & CSS Modules are now supported out of the box๐ด Sass - I would recommend other options๐ด Styled-Components - I would recommend other options
Fetching Data
๐ฅ Watch Lesson (46:30)๐ View Code๐ข API Routes๐ข SWR๐ข GraphQL๐ข Hasura๐ก Apollo Client - I'd recommend SWR๐ก Custom Server - Most needs for this have moved into Next.js corenext start
.
Managing Assets and SEO
๐ฅ Watch Lesson (14:19)๐ข Favicons๐ข Open Graph๐ข Core themes are still valid for SEO๐ก Image Optimization is now supported in Next.js๐ก There's now official guidance on SEO
Building A Blog With MDX
๐ฅ Watch Lesson (32:32)๐ View Code๐ข MDX vs CMS๐ก Component Library (Theme UI) โ I would recommend other options๐ด StaticKit โ Acquired by Formspree
Authentication
๐ฅ Watch Lesson (23:34)๐ข JWTs๐ข Auth0๐ข I have a new course using Firebase and Next.js๐ก Would recommend next-auth for an OSS solution now๐ก Here are my latest thoughts on State Management (Forms)
Testing & Error Handling
๐ฅ Watch Lesson (33:12)๐ข Jest๐ข React Testing Library๐ข Sentry (see latest example)
State Management & More
๐ฅ Watch Lesson (25:41)๐ข TypeScript Integration๐ก Here are my latest thoughts on State Management๐ก Redux (see latest example)
Exporting & Deployment
๐ฅ Watch Lesson (11:20)๐ข Vercel๐ข You no longer need to customize anything invercel.json
- it just works!๐ก ZEIT is now Vercel