Can we write such code in next?
Answered
Dutch posted this in #help-forum
DutchOP
/component/actions.ts
'use server'
function foo {...}
/app/api/some-get.ts
function GET() {
...
foo()
...
}Answered by B33fb0n3
yes, the server action then would be translated to a normal function
2 Replies
@Dutch js
/component/actions.ts
'use server'
function foo {...}
/app/api/some-get.ts
function GET() {
...
foo()
...
}
yes, the server action then would be translated to a normal function
Answer