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

    Making vuex state persistent

    Help
    2
    3
    198
    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.
    • D
      dirkhd last edited by

      Hi everyone,

      Just being a beginner in VueJS I wonder how to make a state persistent between closing and reopening an Android app.

      I saw there are some plug-ins to add this functionality. But I wonder what is the advantage of using vuex, states and vuex-persist instead of using localStorage, for instance.

      BR Dirk

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        Um, vuex-persist uses localStorage (and other methods) to persist the state on the client. Vuex is necessary for medium to larger apps to make the Flux pattern of state management (a reactive programming technique) available within Vue. If you have a simple app and can do state with a global event bus, then you could just store what you need in localStorage too.

        Scott

        1 Reply Last reply Reply Quote 1
        • D
          dirkhd last edited by

          Hey, Scott, thanks for your explanations, that helps me to get a better understanding of the use for vuex. Will just read something about what Flux patterns are 🙂

          BR
          Dirk

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