A
Alokaiβ€’14mo ago
Keider

onSSR allways make my api call

hi, in my application, i create alert message, who must appears on the first loading of a page. I using onSSR() on the default.vue, but when i change the page, it reloading my alert message. I try to using onServerPrefetch, but same result. What i'm doing wrong? It is the best way for what i want to do ?
4 Replies
rohrig
rohrigβ€’14mo ago
Hi @Keider πŸ‘‹ , I need to understand your goal to help you. What is it exactly that you're trying to achieve? What should it do. What is it doing that you don't expect? πŸ˜„
Keider
KeiderOPβ€’14mo ago
Sorry, i work with sylius, i request to get my objet, and display it in an SfModal. i make my request in default.vue with method onSSR. My goal is when a user go on my app, he get this modal once. ( a welcome message for exemple). My problem is when i change page the modal reappears. Is it more clear ? sorry for my english.
rohrig
rohrigβ€’14mo ago
No worries, I think I understand. I think you can copy the example from the LoginModal on the same page. You need to set the state when the user closes the model, so it doesn't reappear:
No description
No description
No description
Keider
KeiderOPβ€’14mo ago
Thank you very much for this,
Want results from more Discord servers?
Add your server