Exposure of codes to the client
Hello!
I hope I understand correctly. So that:
- createServerFn() and createServerOnlyFn() both runs on the server
- createServerFn() can be called from the client but not createServerOnlyFn()
- the source code within both createServerFn() and createServerOnlyFn() are not exposed to the client
Could you please confirm?
Thanks
2 Replies
harsh-harlequin•2mo ago
yes
createServerOnlyFn makes a function that is undefined in the client bundle
createServerFn creates a function that is...well just the function, in the server bundle, and an api call on the client bundle
optimistic-goldOP•2mo ago
thank you @notKamui ^_^