O'Reilly logo

Getting Started with Meteor.js JavaScript Framework - Second Edition by Isaac Strack

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a reaction

Following the creation of our basic template and collection, and with Meteor putting our lists collection into the reactive context, we can now proceed to watch the reactive programming model in action.

Navigate to our Lending Library page at http://localhost:3000/ and open the browser console window.

In the console, enter the following command:

> lists.insert({Category:"Fraggles"});

You will instantly see the page update. Note that, this time, the full page didn't refresh! This is because, under the hood, Meteor is tracking changes to our reactive context (in this case, the lists collection) and the template is being updated immediately after a change is made.

Let's make a few more changes. To do this, enter the same Fraggles ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required