It might not be the best place to ask questions, however I haven't found a better communication channel.
I would like to know what would be an Aura idiomatic solution to the following question?
There's a similar problem in one of the Aura TodoMVC where a stats module needs to be provided with statistical data to do it's job. The way the problem is solved is that the todo-list module compiles the stats and emit a todo.stats event which is listened to by the stats module.
While this works, the stats module is completely dependent on the todo-list module to do it's job correctly. It is true that we could remove the todo-list module without "breaking" anything in terms of exceptions being thrown, however the stats module will also not be doing anything... and the problem just becomes worst as we add new modules that needs access/modify the todo's data.
I still haven't found a proper solution to similar problems (I exposed a few ideas in my question) and wanted to know what were the thoughts of the Aura community on this.
Thanks!
It might not be the best place to ask questions, however I haven't found a better communication channel.
I would like to know what would be an Aura idiomatic solution to the following question?
There's a similar problem in one of the Aura TodoMVC where a stats module needs to be provided with statistical data to do it's job. The way the problem is solved is that the todo-list module compiles the stats and
emita todo.stats event which is listened to by the stats module.While this works, the stats module is completely dependent on the todo-list module to do it's job correctly. It is true that we could remove the todo-list module without "breaking" anything in terms of exceptions being thrown, however the stats module will also not be doing anything... and the problem just becomes worst as we add new modules that needs access/modify the todo's data.
I still haven't found a proper solution to similar problems (I exposed a few ideas in my question) and wanted to know what were the thoughts of the Aura community on this.
Thanks!