layout triggering page update



  • Hello,

    I have a layout containing auth functionalities and pages with behaviours depending on the auth state (login/logout).

    how can I trigger an update of the page when the auth state is changed within the layout? I have some auth function added as mixins in the pages. There is in particular an isLoggedIn function checking whether a token is set in the quasar localStorage. Is there any way for example to watch the isLoggedIn function?

    I understand vuex could be the solution but it adds a complexity layer I’d like to avoid if possible.

    Thanks



  • many options available…

    example:
    specify a boolean value isLoggedIn then use a watcher…basic vuejs stuff:

    https://vuejs.org/v2/guide/computed.html


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.