Server function and "internal" functions.
Is there such a thing as internal functions? Something that can only be called from Tanstack start functions.
I've just created a system for sending notifications, which will only ever be consumed in server funcitons, so I'm wondering if there's a solution to ensure that sending notifications can only happen from server functions.
3 Replies
genetic-orange•2mo ago
so I'm wondering if there's a solution to ensure that sending notifications can only happen from server functions.Specifically "server functions" i believe no. There is one for "executeable only on server side" though,
serverOnly
it will throw if called from client sideother-emeraldOP•5w ago
Hell yeah, thanks for that! Worked a treat
I was looking through the docs for server only, so maybe I just blind on that day
genetic-orange•5w ago
No prob! It, together with
clientOnly
and createIsomorphicFn
are all still undocumented, sadly.