flâneur — a map of the web's best reading

Learn Next.js: Mutating Data | Next.js

nextjs.org · 3,798 words · saved by 1 readers

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

Explore this link on the map →

related reading