3 ms·
i just wanna add here on a serious note that i also see a use cases for "server actions", but i do not primarily write next.js or react so i didn't have an oppo
by 0natcer 3y ago
i just wanna add here on a serious note that i also see a use cases for "server actions", but i do not primarily write next.js or react so i didn't have an opportunity to try them out yet.
I think it's important to know what you would use them for. I don't think core business logic should be there, but I see why you would use them for f.e. signing something that would require a secret you don't want to have on the client side.
I do however think that it's not a good idea to show the inline code example in a presentation. fortunately none of those examples exist in the documentation. having a seperate file with server actions that can be imported is a good way to handle it i think.
- bottlepalm 3y agoI could take this php example or raw sql code and put it in the body of an API call from the client. Are API calls bad now? Same thing. A misunderstood example.