Skip to content

Commit

Permalink
Colors to Tracker's readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Feb 22, 2015
1 parent f426f09 commit 05b6ddb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ is five times longer than the Tracker source code itself. You can also browse th

Take this ordinary JavaScript function:

```
```javascript
var currentTemperatureFahrenheit = function () {
return currentTemperatureCelsius() * 9/5 + 32;
};
Expand Down Expand Up @@ -49,7 +49,7 @@ The function passed to `Tracker.autorun` is called once immediately, and then it

Or, instead of calling `Tracker.autorun` ourselves, we might use `currentTemperatureFahrenheit` in a [Blaze](https://www.meteor.com/blaze) template:

```
```handlebars
<!-- In demo.html -->
<template name="demo">
The current temperature is {{currentTemp}} degrees Fahrenheit.
Expand All @@ -59,7 +59,7 @@ Or, instead of calling `Tracker.autorun` ourselves, we might use `currentTempera
</templates>
```

```
```javascript
// In demo.js
Template.demo.helpers({
currentTemp: function () {
Expand All @@ -76,7 +76,7 @@ When this template is shown, the temperature shown on the screen will update liv

What does it look like on the other side, for package authors that are creating new reactive data sources? Here's what the implementation of `currentTemperatureCelsius` might look like (supposing you had an object `Thermometer`, with methods `read` and `onChange`):

```
```javascript
var temperatureDep = new Tracker.Dependency;

var currentTemperatureCelsius = function () {
Expand Down

0 comments on commit 05b6ddb

Please sign in to comment.