---
title: "Discussion on \"When should I use Server Actions (Next.js 15)\" | Hashnode"
description: "Discussion on \"When should I use Server Actions (Next.js 15)\". Exploring the Right Use Cases and the Main Pitfalls for Server Actions in Your React and Next.js Apps"
url: "https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [When should I use Server Actions (Next.js 15)](https://yohanlb.hashnode.dev/when-should-i-use-server-action-nextjs?utm_source=hashnode&utm_medium=feed)

Exploring the Right Use Cases and the Main Pitfalls for Server Actions in Your React and Next.js Apps

Oct 16, 2024 · 7 min read · yohanlb.hashnode.dev  
Updated May 17  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#server-actions](https://hashnode.com/tag/server-actions)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#apis](https://hashnode.com/tag/apis)

## Written by

[Yohan LB](https://hashnode.com/@yohanlb)

@yohanlb

  
[View profile](https://hashnode.com/@yohanlb)

I build web apps and stuff

Currently working on GeoQuiz.co !

## Responses 5

Markdown supported · ⌘↵ to post

[Lewis](https://hashnode.com/@lewis-h)

[May 11](https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2/comment/6a022455fca21b0d4b598810)

Hmm... You shouldn't use server actions to fetch data, only to mutate it. And some of the other benefits didn't really make sense (e.g. you 'don't have to implement an API route', but you do have to implement a server action, which behind the scenes is an API route, and therefore requires a lot of the same code) This could use more research and an update perhaps :)

[Yohan LB](https://hashnode.com/@yohanlb)

[May 17](https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2/comment/6a022455fca21b0d4b598810#reply-6a0a1dfd3104e2aff0d41b7d)

Hey Lewis, thanks for reading! and the article actually agrees with you on that one!

This nuances in what should be the use cases for Server Actions are actually the whole point of this article :)

Server Actions are POST-only and can't be natively cached, which makes them a poor fit as soon as your data fetching needs any caching or state management. Something like TanStack Query or SWR will serve you much better there.

On the API route point, the abstraction still meaningfully reduces boilerplate and makes TypeScript types seamless across boundaries. Similar concept under the hood, very different experience in practice.

[Vaibhav](https://hashnode.com/@vaibhavdwivedi)

[Oct 19, 2024](https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2/comment/67135150a13039cd38727fc5)

Very insightful. Thanks for sharing!

[Vishwas Babar](https://hashnode.com/@Vishwas7769)

[Oct 18, 2024](https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2/comment/67128ead7b3544717172fa74)

Thanks for it

[Yohan LB](https://hashnode.com/@yohanlb)

[Oct 17, 2024](https://hashnode.com/posts/when-should-i-use-server-action-nextjs/67101fe7da7b60704b350eb2/comment/6710cbc4622732893ce5e113)

Let me know what you think! Can you think of more use cases? What is your favorite way to use server actions?
