Here is a pretty important JavaScript and Aurelia question.
Say I have a singleton object, for example User, and it often receives updates from a server that returns a whole new object User.
Now, to click update on the views, I have two options (what I know):
Manually update each property of an existing one Userto a new one User(this also requires matching each property).
Replace the object reference and click the notification EventAggregatorfor all listeners to re-request the object User.
Currently, I have switched to option number 1, which raised some problems, but does not block anything.
Which of them will be more effective and / or will give more advantages in comparison with others?
Travo source
share