3 ms·
Really hyped about this! I can't wait to try it out and watching the CI build as we speak. I am curious however about a few points. From their examples in the b
by Escapado 3y ago
Really hyped about this! I can't wait to try it out and watching the CI build as we speak.
I am curious however about a few points. From their examples in the blog post it's not clear what kind of payloads can be transfered when using server actions. Do they need to be serializable in a specific way? Can I transfer dates? Can they return something (in case I want to validate a form on the server and return an error or a success code)? How does it figure out that the db import will not be bundled into the client? Because it is only used in the function with the "use server" directive? And finally: Can I call "use server" functions in a client component too? In case I want some extra state in there?
Maybe there is someone here who knows more!
- sionarancsle 3y agoThey are just POST requests to an under-the-hood generated API endpoint.. I don't understand the use-case of these. Makes form validation and basically any type of reactivity bad.