|
I have an function that uses random number generation (currently
Is there a solution that allows me to avoid these drawbacks i.e. not make extra requests to the server but also not render the page twice with different values on initial load? |
Answered by
echocrow
Feb 25, 2026
Replies: 1 comment 3 replies
|
if anyone stumbles across this question in 2026: these days sveltekit has whatever value is generated/returned in SSR will carry over into hydration, ensuring a hydration match and avoiding said unpleasent change as JS kicks in |
3 replies
Answer selected by
FeldrinH
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if anyone stumbles across this question in 2026: these days sveltekit has
hydratable(), which may solve this kind of problem:whatever value is generated/returned in SSR will carry over into hydration, ensuring a hydration match and avoiding said unpleasent change as JS kicks in