#How to handle state with App Router server components?

2 messages · Page 1 of 1 (latest)

hollow hatchBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

      🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in <id:customize>

      ✅ You can mark a message as the answer for your post with `Right click -> Apps -> Mark Solution`
      (if you don't see the option, try refreshing Discord with Ctrl + R)
waxen edge
#

It seems almost anti-react this new way of doing things, unless I am doing something very wrong. Would it be bad practice to have a state inside the client component, that stores the props it recieves?

App router removes the need for storing server state on the client. Instead, when we want to mutate data (create a new post), we can simply update it on the server with server actions and revalidate the route path

This animation may be helpful
https://twitter.com/asidorenko_/status/1681017694072500224

And this docs section:
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions