
Explore React server components with Next.js app router, learn when to use server versus client components, and master updates, caching, fetches, streaming, and server actions.
Marissa Beyer, a long-time React developer and freelance instructor, introduces her background, front-end focus, and experience with React server components.
Identify and install prerequisites like node, npm, and git, then set up a starter Next.js app with the app router and TypeScript, preparing to migrate to react server components.
Clone the GitHub repository, install dependencies with npm, and run Prisma to set up a SQLite database while exploring a Next.js app with movies, genres, and server and client components.
Discover how React server components run on the server, enable direct database access, improve type safety, and combine server and client components with two bundles and suspense streaming.
Explore how Next.js and the app router power React server components, distinguish server and client components, and learn patterns for server side rendering, suspense boundaries, and caching.
Turn a React client component into a server component by removing the use client directive, fetching data server-side with an async component, and adapting nested components for server rendering.
Update the movies by genre and the movie details page to React server components, removing client-only code, using async functions and qualified URLs for server rendering with or without JavaScript.
Turn the movie card into a React server component, move static parts to the server, and render the add to cart button as a client component.
Explore how Next.js caches data for React server components and learn to fix updates by forcing dynamic routing, using router.refresh, and understanding server and client caches in production vs development.
Learn to query the database directly in React server components, replacing REST calls with a server-side getMovies function using Prisma, for faster, safer, and smaller bundles.
Learn to prevent over fetching by selecting only needed fields with Prisma in React server components, using type-safe selects and the satisfies operator.
Learn to use React server components with Suspense in Next.js pages, and replace suspense boundaries with a loading dot tsx for asynchronous pages.
Learn how React server components stream from server to client, using x component responses, suspense boundaries, and RC parameters, with revalidate path or tag triggering instant updates.
Explore how react server components render on the server by default, how the use client boundary switches rendering to the client, and how the server only package enforces server code.
Load the movie genres on the server with React server components, using suspense and a genre loader to avoid client-only data fetching and reduce layout shifts.
Explore handling external dependencies that require client state by wrapping them with a client wrapper and applying the use client directive in react server components.
Explore unit testing of asynchronous React components with the React Testing Library, and end-to-end tests like Cypress or Playwright. Learn to wrap renders in act to stabilize async state updates.
Learn how to test asynchronous React server components, use a function-call workaround when the testing library lacks async support, and prefer end-to-end tests with Cyprus or Playwright.
Explore how React server actions enable server-side mutations via form submissions, with use server directive, form state, and form status integration for seamless client-server communication.
Learn to call server actions from a form in a React server component using an action prop and server annotation, with form data handled as FormData.
Use the useFormStatus hook to track form submission and disable the submit button during pending states. Render the status as a child component inside the form for behavior and reusability.
Explore how the useFormState hook lets React server actions return serializable state for client-side form validation and UI updates.
Learn how to attach custom actions to individual submit buttons in a form, override the form action per button, and implement server actions for delete and other tasks.
Learn to call React server actions from any JavaScript or TypeScript code, treat them as async functions, and handle server responses and errors in a shopping cart flow.
Discover best practices for React server components and React server actions, using shared components, server components, and use client directives. Understand Next.js app router, caching, suspense, and appropriate use cases.
Boost your skills and developer potential with this comprehensive course on React Server Components. Designed for budding and proficient React developers alike, this course will help you understand the why's and how's of React Server Components, and why they matter in today's digital landscape.
The course begins with an overview of what React Server Components are and how they differ from traditional React components and Server-Side Rendering. You'll learn how these components can effectively execute on the server, deliver better type safety and lead to smaller bundle sizes.
Led by Maurice de Beijer, a seasoned developer and a recognized Microsoft MVP, this course is more than just instructions, it’s a bridge to the future of web-based React applications. This course delivers practical learning through real-world examples. You'll learn how to turn a React client component into a server component, how to handle updates and caching and how to query databases directly from a React Server Component.
To enhance your learning experience, the course offers insights on the use of Suspense & React Server Components and their application in streaming. We'll also discuss how to diagnose server components and how to effectively use React Server Actions.
To further amplify your developer potential, this course encourages hands-on learning. This guarantees to take your understanding of React Server Components to the next level, while also equipping you with the enhanced skills needed to build better applications.