RetroFed Forums
Your home away from modern life.
General architecture around Pinia to handle guards, interceptor and reactivity
Post Reply
AuthorMessage
lascapi jlai.lu lascapi@jlai.lu
Joined: 2023-07-27
Quote

Hi there, I'm working on a new app with Vuejs 3 and I wonder what are the good practice to architecture the app and to handle guards, JWT token refresh, reactivity and not having spaghetti code.

I started with the basic Vuetify app and added Pinia and the vue-router. 🤠

One problem I want to solve is how to get the list to populate the first page with a list of objects, lets say a book list.
Right now I created a store.books list and an action to call the API, according to the doc ( https://pinia.vuejs.org/core-concepts/actions.html ).
But then I have to call the action when the user log in, or when the component is mounted, or when there is a refresh.

I found it not very DRY and just not smart, so I need some help and good doc to understand how to structure my app.

Thank you 😌

1   Original
Post Reply
Back to top