Level 8
@aarontharker You should try this.$page
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm playing around with Laravel Jetstream using Inertia/Vue. The $page.props are accessibile via the v-if functions on elements and components but if I try to use the the same variable inside a js function, e.g. to check if a user is logged in, I get ReferenceError: $page is not defined.
use Inertia usePage() hook.
Please or to participate in this conversation.