Accessing shared data #2071
Unanswered
beard7
asked this question in
Help (Vue)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the
HandleInertiaRequests
middleware to made some data available in every request, as described in the documentation.I'm also retrieving the data in compoinents using the method described in the docs:
import { usePage } from '@inertiajs/vue3'
That's all fine and working as expected, but the question is what's the advantage to accessing the shared data via
usePage
rather thandefineProps
which also works? Is there any reason whjy I shouldn't accesses the shared data viadefineProps
?Beta Was this translation helpful? Give feedback.
All reactions