Possible to access $page.data in ParamMatcher? #8313
Unanswered
richarddavenport
asked this question in
Q&A
Replies: 1 comment 4 replies
-
No, param matchers are used to identify the route to load, page data is built using that route. -> Chicken, meet Egg |
Beta Was this translation helpful? Give feedback.
4 replies
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 trying to access the
$page.data
in aParamMatcher
usingget(page)
. Internally sveltekit eventually invokesgetStores()
. From the docs:getStores()
throws an error (Function called outside component initialization
) due to the fact that it's matching routes and doesn't appear to have started component initialization yet.Is there another way to access
$page.data
in aParamMatcher
?Beta Was this translation helpful? Give feedback.
All reactions