T
TanStack2mo ago
frail-apricot

Mark an object as server only?

Is there a way to mark an object/function/variable as server only? E.g const SUPER_SEGRET_OBJ = something; in the global scope.
2 Replies
equal-aqua
equal-aqua2mo ago
yes const s = createServerOnlyFn(() => ...)()
frail-apricot
frail-apricotOP2mo ago
right @notKamui thanks 🙏

Did you find this page helpful?