Confusion about Meteor _uihooks and what triggers them
问题 I'm confused about how _uihooks works. Check out the below code: home.html <template name="homePage"> <section id="home-page"> <div class="container"> <h1>Thought of the day:</h1> <div id="totd"> <span>{{thought}}</span> </div> </div> </section> </template> home.coffee timer = 0 Template.homePage.rendered = -> this.find('#totd')._uihooks = insertElement: (node, next) -> console.log 'Inserted' removeElement: (node) -> console.log 'Removed' Session.set 'randThought', Random.choice thoughts