Load server data at Layout (root) level
#2776
Answered
by
rtritto
rtritto
asked this question in
Help & Questions
-
|
The global Layout ( I did a try with |
Beta Was this translation helpful? Give feedback.
Answered by
rtritto
Oct 14, 2025
Replies: 1 comment 3 replies
-
|
Have you seen https://vike.dev/Layout#data-fetching? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, now it's clear 🔝
Currently is there a way to add a custom property (e.g. value from globaThis or env var) to
/pages/+configand then read it in/pages/+Layoutor the only way is with the/pages/+data(#1833)?Edit: Probably the only way is with #1833 because
+configcan't be used at runtime (source).Edit2: In my use case, I confirm that #1833 is the only way with
+data.once