Deal with large datasets #548
-
This is more of a general architecture question than really related to Pinia itself. I'm working on a email client project which retrieve emails from remote mailboxes and I want to store them locally for offline use eventually. I would use getters to retrieve data from the IndexedDB instance but first, getters won't allow asynchronous calls which are required for a good user experience and second, it looks more of a hack than a proper solid solution. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You would use an action to do the async operation and store the emails on a state property. You could also save the loading state in a different variable or even use something like https://github.com/posva/vue-promised#composition-api inside of a setup store (the new function syntax) |
Beta Was this translation helpful? Give feedback.
You would use an action to do the async operation and store the emails on a state property. You could also save the loading state in a different variable or even use something like https://github.com/posva/vue-promised#composition-api inside of a setup store (the new function syntax)