Next.js is one of the most popular frameworks for building web applications. It's fast, flexible, and powers some of the biggest sites on the internet.
But when it comes to building production-ready applications, setting up your Next.js project can be a real headache.
With the introduction of the App Router and React Server Components, there have been significant changes to the way applications are structured and built. There are also decisions to make about styling approaches, data fetching strategies, testing frameworks, and the CI/CD pipeline.
It's easy to get overwhelmed.
Here are just some of the challenges that developers face when working with Next.js:
- Router Uncertainty: Should you use the App Router or the older pages router? What are the trade-offs?
- Component Confusion: When should you use client components vs. React Server Components? How do best handle context and data sharing?
- Performance Bottlenecks: Why does your app feel slow? How can you optimize data fetching and rendering?
- Authentication Headaches: How do you handle user authentication and session management securely?
- Deployment Anxiety: What are the best practices for deploying Next.js applications to production to ensure they're reliable and secure with minimal downtime and bugs?
- Scaling Pains: What should you do to ensure your Next.js application can handle increased user load as it grows?
Working with Next.js shouldn't be confusing.
Whether you're brand new to Next.js or a seasoned developer looking to keep up to date with the latest features, Pro NextJS will teach you everything you need in order to build web apps with confidence.
This series of self-paced workshops is full of in-depth knowledge, real-world examples, and practical advice to help you understand trade-offs when building with Next.js.
Your Instructor
Jack Herrington is a Full Stack Principal Engineer who orchestrated the rollout of React/NextJS at Walmart Labs and Nike. He is also the "Blue Collar Coder" on YouTube where he posts weekly videos on advanced use of React and NextJS as well as other frontend technologies trends.
His YouTube channel hosts an entire free courses on React and TypeScript. He has written seven books including most recently No-BS TypeScript which is a companion book to the YouTube course.
What's Included
Getting to Know Next.js
The first workshop in the series touches on all of the most important parts of working Next.js.
But instead of building yet another to-do app, you'll build a fully featured ChatGPT-like application. Here's what's covered:
- Project Setup & Deployment: Configure a Next.js application with TypeScript, ESLint, and Tailwind CSS that will be deployed continuously to Vercel.
- Routing & Layouts: Use the App Router to create application routes and layouts that inform data fetching and navigation.
- User Authentication: Implement user authentication and session management.
- Streaming AI Responses: Build a dynamic chat application that connects to OpenAI's API and streams responses in real-time.
- Database Integration: Store chat data in a Vercel Postgres database.
Styling Next.js Applications
There have been some great strides in how web applications are styled, but with the introduction of the App Router and React Server Components, there are new challenges to face. Client components, context issues, and the need for responsive design all come into play.
In this workshop module, you'll take a tour through some of the most popular options for building responsive, theme-ready UIs in Next.js. You'll practice with:
- CSS Modules: A classic (but sometimes verbose) way to style components.
- Tailwind CSS: The utility class approach has gained popularity, but requires some configuration steps and strategy to keep readable.
- StyleX: Meta's StyleX library provides a way for granular control over components, design tokens, and theming.
- Pigment CSS: Material UI is a popular component library, but isn't compatible with React Server Components. In response, the team created Pigment CSS, which increases performance while keeping styles organized.
- Emotion: While not the most modern approach, many applications still use Emotion for styling. Learn how to configure the library for supporting App Router applications.
Project Infrastructure
There are a variety of tools, frameworks, and processes that support modern Next.js applications– especially when working as part a team. This workshop module shares some suggestions and best practices for building a rock-solid foundation for your project's infrastructure. Here's the breakdown:
- Code Style & Consistency: Use tools like ESLint and Prettier to enforce style guides for your team.
- Component Organization: Learn to weigh the pros and cons of different project organization strategies for promoting reusability and easier navigation.
- Build a Component Library: Use Storybook for building and documenting components in isolation.
- Unit and End-to-End Testing: Implement tests with Jest, Vitest, Cypress, and Playwright for both client and server side.
- Monorepo Management: When your team works on multiple projects, Turborepo helps manage shared code and dependencies.
- Client & React Server Components: Go deeper into client components and RSCs, including strategies for handling context and data sharing.
Client and Server Communication
Once you've got a Next.js application deployed, there are still many considerations to make that will affect the performance and user experience of your application. This workshop module covers advanced Next.js topics for handling client and server communication:
- Caching Strategies: Understand and implement a variety of caching and revalidation options, including supporting API routes and using tags for precise cache control.
- File Uploads: Use server actions or API routes to handle both local and cloud-based file uploads, while seamlessly updating the UI.
- Choosing System Architecture: Explore different architectural patterns and their trade-offs for communicating between the client and server. Topics include server actions, Backend-for-Frontend, tokens, and more.
- Advanced Server Actions: Go beyond basic server actions and practice with advanced techniques through building a CDN simulator, intercepting client fetch requests, and building a data streaming solution.
- Granular Suspense: Implement a stock data app with fine-grained React Suspense loading states to provide responsive feedback for a better user experience.
From setting up a project to deploying it, styling it, and managing its infrastructure, Pro NextJS covers it all. You'll learn by doing, with hands-on exercises and real-world examples that will increase your confidence with Next.js.
Get started now!