Benefit of using server-side rendering

When it comes to the benefits of using server-side rendering, the most obvious ones are:

But there is one more benefit you can have when using server-side rendering. You can hide the code based on user role. For example, you can write a Javascript code that will only be user to admin. Even if the user try to view page source, he will still not find it.

@if (auth()->check() && auth()->user()->type == "admin")

    <script>
        function adminFunction () {
            //
        }
    </script>

@endif

This makes sure to create the function adminFunction() if the user is logged-in and is admin.