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