how can I see console.log output in Solid Start server actions?
I have an action like this:
The console.log does not print anywhere for the action. Not in the dev server, nor in browser console. Is there a way to output items from actions?
3 Replies
Somehow I don't think that is your real question.
my action is running in the server. If I put console.log in a separate server module and import it, everything works but when I put console.log in the client-side component with server action inside, the console.log does not print anything
In your OP the action would run client-side (no
use server
). However there is nothing in the <CreateItem />
that would trigger a submit which is necessary to run the action.
Also your action()
is missing the second parameter, the name
of the action (e.g. my-action
).
As a proof-of-concept this seems to work: