How can I simplify this in Vue / quasar so I don't need to call allNotis.filter twice
- User
How can I simplify this in Vue / quasar so I don't need to call allNotis.filter twice
- Assistant
If you'd like to minimize the number of calls to
allNotis.filterand reduce redundancy in your Vue/Quasar code, consider calculating the filtered results once and using computed properties or methods to further refine or categorize them. Here's an example of how to do this using computed properties:Firstly, create a computed property that filters
allNotisonce and stores the result. Then create additional computed properties that use this pre-filtered data.javascript