Back in May I found an issue and a workaround for ReactiveDict not updating when inserting new keys.
I found the issue while replacing Session with ReactiveDict. The workaround is to have a predefined key ‘fake’ and change it every time new keys are added to the dictionary, thus triggering recomputation.
On Stackoverflow, David Weldon answered it was due to the implementation in Meteor 1.1 and in an incoming implementation the issue would be fixed.
In between the Session package has been separated from the core and my understanding is we are recommended to avoid using it to prevent global namespace pollution, name clashes and make template reusing more robust by encapulating state in a reactive var / dict saved in the template instance.
I see the implementation has changed but I don’t see how to rewrite the loop I was using before, which still doesn’t update on first insert
const reactive_dict = new ReactiveDict() for (let key in reactive_dict.keys) if (reactive_dict.get(key)) ...