Learn Next.js: Mutating Data | Next.js
In the previous chapter, you implemented search and pagination using URL Search Params and Next.js APIs. Let's continue working on the Invoices page by adding the ability to create, update, and delete invoices! In this chapter... Here are the topics we’ll cover What React Server Actions are and how to use them to mutate data. How to work with forms and Server Components. Best practices for working with the native formData object, including type validation. How to revalidate the client cache using the revalidatePath API. How to create dynamic route segments with specific IDs. How to use the React’s useFormStatus hook for optimistic updates. React Server Actions allow you to run asynchronous code directly on the server. They eliminate the need to create API endpoints to mutate your data. Instead, you write asynchronous functions that execute on the server and can be invoked from your Client or Server Components. Security is a top priority for web applications, as they can be vulnerable t
11 Chapter 11 Mutating Data In the previous chapter, you implemented search and pagination using URL Search Params and Next.js APIs. Let's continue working on the Invoices page by adding the ability to create, update, and delete invoices! In this chapter... Here are the topics we'll cover What React Server Actions are and how to use them to mutate data. How to work with forms and Server Components. Best practices for working with the native FormData object, including type validation. How to revalidate the client cache using the revalidatePath API. How to create dynamic route segments with spec
related reading
- Guides: Forms | Next.jsnextjs.org
- Getting Started: Mutating Data | Next.jsnextjs.org
- App Router: Streaming | Next.jsnextjs.org
- RSC From Scratch. Part 1: Server Components · reactwg server-components · Discussion #5github.com
- Getting Started: Error Handling | Next.jsnextjs.org
- App Router: Adding Search and Pagination | Next.jsnextjs.org
- App Router: Adding Authentication | Next.jsnextjs.org
- Making Sense of React Server Components • Josh W. Comeaujoshwcomeau.com
- App Router: Navigating Between Pages | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- How Mozilla’s Rust dramatically improved our server-side performance | Figma Blogfigma.com