[Vuejs]-Combine Flux (vuex) store with global event bus?

2👍

It really depends of your requirements, but one thing I can tell is that using two separated stores + bus is defeating the whole purpose of Redux.

If the tasks in your application share the same scope and can be assigned to you or other users that you may be visiting/managing, you can have all the tasks from your scope (your team, for example) and display it on different places using different getters with Array.filter functions.

If the number of tasks is too big to have it all loaded, I’d approach it doing one single tasks list in the store, being populated from a single url.

ie:
– Give me all the tasks I have + the tasks of current user I’m managing
– Give me all the tasks I have + the tasks that matches this search

Although this can get messy if the requirements are more complicated and can get confusing. But try to structure your application with one single store if possible and avoid bus, as it is only recommended for small size applications.

Leave a comment