Replies: 1 comment 1 reply
-
I found the solution, codes like window.xxx or localStorage and etc, must be used inside functions like onMounted, onBeforeMount, ... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm sorry if this is a newbie question, but How can I handle a code like this when using SSR:
window.addEventListener();
orlocalStorage.set()
?This code is working fine in client side, but crashes when used in Server side, what is the correct way of handling these kind of things? I'm using Vue3 and Laravel, My application flow depends on these events so I cannot just delete it, or check if window is defined or ...
Beta Was this translation helpful? Give feedback.
All reactions