4 ms·
> It is written as if this only applies to functions you mark with use server and not the whole file. The demonstration code illustrating the problem uses a fi
by dragonwriter 1y ago
> It is written as if this only applies to functions you mark with use server and not the whole file.
The demonstration code illustrating the problem uses a file-level "use server" directive (and doesn't have other functions in the same file with the problem isOwner function); if they were using function level "use server" directives and it impacted a different function in the same file, I would say this is clearly surprising and unexpected (and even buggy) behavior, but this seems to be using a clearly documented feature and getting exactly what is advertised.