The application is deployed here: memoryapp.meteor.com source is available in the git repository here: https://github.com/SnappyCroissant/memoryapp
To reset, run the application
Cards.update({}, {$set: {state: 'play'}}, {multi: true})
from the console.
I know that itβs bad to have client access to such collections, the application is far from ready for production. I just find my way through Meteor.
Currently, when any update is performed in Maps, the entire DOM redraws, with the exception of those elements that I called persistency on. As far as I know, although the elements should be updated only during the update, or did I misunderstand how reactivity works?
The only real dynamic change that occurs in the script is that the 'state' property of the objects in the Maps changes. And yet, it redraws every property and every DOM element, unless explicitly declared.
Is it because they are all passed to the template in one array? If so, what is the best alternative method to do this.
The structure is a small hash because it was a learning experience, all the important bits for the problem (as far as I know) live in client/memory.js and server/model.js
source share