{{#template name="apiSession"}}
We've always been at war with {{dstache}}theEnemy}}.
{{lt}}/template> ``` ```js // in main.js Template.main.helpers({ theEnemy: function () { return Session.get("enemy"); } }); Session.set("enemy", "Eastasia"); // Page will say "We've always been at war with Eastasia" Session.set("enemy", "Eurasia"); // Page will change to say "We've always been at war with Eurasia" ``` {{> autoApiBox "Session.equals"}} If value is a scalar, then these two expressions do the same thing: (1) Session.get("key") === value (2) Session.equals("key", value) ... but the second one is always better. It triggers fewer invalidations (template redraws), making your program more efficient. Example: ```html {{lt}}template name="postsView"> {{dstache}}! Show a dynamically updating list of items. Let the user click on an item to select it. The selected item is given a CSS class so it can be rendered differently. }} {{dstache}}#each posts}} {{dstache}}> postItem }} {{dstache}}/each}} {{lt}}/template> {{lt}}template name="postItem">