3 ms·
There's nothing about "use server" that requires it to be at the top of the file though, it can go in function bodies and you have a typed RPC method. I think
by c-hendricks 1y ago
There's nothing about "use server" that requires it to be at the top of the file though, it can go in function bodies and you have a typed RPC method.
I think "use client" is the only one that has to go at the top of a file.
- TimReynolds 1y agoYou are correct. Use server can be slapped in many places