Tapas AdhikaryforfreeCodeCampfreecodecamp.org·Oct 22, 2024How to Pass Additional Arguments to Next.js Server ActionsAsynchronous data mutation and handling is a necessary task in modern web applications. You may want to execute a standalone asynchronous function on the server to carryout tasks like saving data to the data store, sending emails, downloading PDFs, p...DiscussReact
Yohan LByohanlb.hashnode.dev·Oct 16, 2024FeaturedWhen should I Use Server Action (Next.js 14)When I started working on my GeoQuiz App, I started experimenting with the new Next Server Actions. And probably like many of us, I quickly learned to love it, they felt like a clean and efficient solution for most of my server requests. But as I sta...Vishwas Babar and 2 others are discussing this3 people are discussing thisDiscuss·50 likes·1.2K readsReactNext.js
Rishi BakshiforRishi Bakshi Blogrishibakshi.hashnode.dev·Oct 9, 2024The Biggest Mistake You’re Making with Next.js Server Actions: Silent ThreatOne of the critical mistakes I learned in my Next.js journey is failing to validate and protect server actions. Server actions in Next.js can expose post routes, which can be vulnerable if not properly secured. When using server actions, it's essenti...Discuss·10 likesYou Don't Know Next.jsNext.js
Rishi BakshiforRishi Bakshi Blogrishibakshi.hashnode.dev·Oct 9, 2024Think Server Actions Can Only Be Used in Server Components? Think againOne common misconception in Next.js development is thinking that server actions can only be utilized within server components. However, this isn't the case. Server actions can be used inside client components as well, which allows us to interact with...DiscussYou Don't Know Next.jsNext.js
Rishi BakshiforRishi Bakshi Blogrishibakshi.hashnode.dev·Oct 8, 2024Page Not Reflecting Updated Data After Mutation? Here's How to Fix ItWhen working with data mutations in Next.js, one common problem is when the page doesn’t update after adding or editing data. Imagine you’re adding a new to-do item via a server action, and even though the data is updated in the database, the changes...Discuss·10 likesYou Don't Know Next.jsMutations
Rishi BakshiforRishi Bakshi Blogrishibakshi.hashnode.dev·Sep 22, 2024Data Fetching: Why Server Actions Outperform Route HandlersOne of the common beginner mistakes I’ve encountered is misunderstanding the difference between when to use route handlers and when to use server actions for data handling in Next.js. With the introduction of server actions and server components in N...Discuss·1 likeYou Don't Know Next.jsserver actions
Abeer Abdul Ahadabeer.hashnode.dev·Sep 18, 2024FeaturedWhat are Server Actions in Next.js? Next.js 14 EditionWhat are Server Actions? To let you get the concept crystal clear, server actions are basically backend stuffs that you can do in your Next.js project. Server actions play a key role in web applications, handling tasks like data processing and user a...lilac and 5 others are discussing this6 people are discussing thisDiscuss·15 likes·187 readsNext.jsNext.js
Rishi BakshiforRishi Bakshi Blogrishibakshi.hashnode.dev·Sep 10, 2024Understanding use server and Avoiding Data Leaks in Next.jsOne of the common misconceptions in Next.js is the belief that adding the use server directive to a component will automatically turn it into a server component. However, this isn't accurate. The use server directive is used to create server actions,...DiscussYou Don't Know Next.jsdata-access-layer
Daniel Simonsonmariposablog.hashnode.dev·Aug 13, 2024The Problem Nextjs SolvesReact was great for making fast applications that allowed for interactivity. Static site generators like Gatsby, Jekyll etc. were good at making applications with quick load times and snappy SEO ratings. You could do one or the other but not both. Th...Discuss·47 readsclient side actions
K I R A Nkir4n.hashnode.dev·Jul 23, 2024Efficient Type-Safe Server Actions in Next.js with ZSATL;DR: Discover how to implement type-safe server actions in your Next.js application using zsa or next-safe-action. This guide focuses on zsa, offering a clear approach to integrating type safety, validation, and error handling. Introduction to Type...Discuss·121 readszsa