Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server action improvements #6

Open
lubieowoce opened this issue Jul 30, 2023 · 0 comments
Open

Server action improvements #6

lubieowoce opened this issue Jul 30, 2023 · 0 comments

Comments

@lubieowoce
Copy link
Owner

Moved from #5 (comment)

  • revalidatePaths is kinda working, but rn it just causes router.refresh() which drops EVERYTHING. instead, it'd be nicer to only drop the parts that were revalidated, which'd require some cache surgery
  • for forms to work well, we need a redirect() thingy
  • finally, maybe it'd be nice to return an RSC response with the new page instead of requiring another fetch upon submit

Questions:

  • should we allow pure-json actions, or should we squeeze everything through the lowest common denominator of FormData to make actions sent from JS and non-JS have the same interface?
  • DO WE need to return the updated page? maybe it's fine to just send over e.g. a redirect?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant