is "use server" necessary for form actions in solid start?
the documentation doesn't include "use server" but I couldn't get it to work without that directive. Just trying to figure out if it is a bug or intended and the documentation needs to be updated
6 Replies
Most of the time you will "use server" because you'll want to update the db or something similar
What if nothing server related is used? Does it still need to be "use server" for actions to work?
If yes then I think documentation is lacking
Or atleast misleading
That I'm not quite sure about. I don't think it would need the use server then
Got it, Thanks for the insight anyways, in my testing it doesn't work without use server no matter what
‘use server’ isn’t necessary then. actions are part of the router and are independent of server functions
I think that didn't work for me but I'll try if I can repro in a codesandbox
you are right I cannot repro it now