No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    layout triggering page update

    Help
    2
    2
    515
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nico-L last edited by

      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

      1 Reply Last reply Reply Quote 0
      • M
        Max last edited by

        many options available…

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

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post