Refactor vuex store
Opened this issue · 0 comments
jappe999 commented
Expected Behavior
I want to use dictionaries in the state and transform them to arrays when needed. This is better, because I can easier filter duplicates, fetch single entities and update or delete them.
Current Behavior
Right now everything is done in arrays. Because of this, I need to perform a lot of mapping and filtering.
Possible Solution
Use dictionaries instead of arrays in the state. Transform those dictionaries to arrays when needed in the getters.
Context
The code is getting a little more unreadable every time I use an array method in the store.
Your Environment
- Version used: 1.0
- Environment name and version (e.g. Chrome 39, node.js 5.4): N/A
- Operating System and version (desktop or mobile): N/A