underscore

underscore Underscore is a utility-belt library for JavaScript that provides support for functional programming. It is invaluable for writing clear, concise JavaScript in a functional style. The underscore package defines the _ namespace on both the client and the server. Currently, underscore is included in all projects, as the Meteor core depends on it. _ is available in the global namespace on both the client and the server even if you do not include this package. However if you do use un

Tracker.nonreactive

Client Tracker.nonreactive(func) import { Tracker } from 'meteor/tracker' Source Run a function without tracking dependencies. Arguments func Function A function to call immediately.

Tracker.Dependency

Tracker.Dependency A Dependency represents an atomic unit of reactive data that a computation might depend on. Reactive data sources such as Session or Minimongo internally create different Dependency objects for different pieces of data, each of which may be depended on by multiple computations. When the data changes, the computations are invalidated. Dependencies don't store data, they just track the set of computations to invalidate if something changes. Typically, a data value will be acco

Tracker.flush

Client Tracker.flush() import { Tracker } from 'meteor/tracker' Source Process all reactive updates immediately and ensure that all invalidated computations are rerun.

Tracker.currentComputation

Client Tracker.currentComputation import { Tracker } from 'meteor/tracker' Source The current computation, or null if there isn't one. The current computation is the Tracker.Computation object created by the innermost active call to Tracker.autorun, and it's the computation that gains dependencies when reactive data sources are accessed.

Tracker.Computation

Tracker.Computation A Computation object represents code that is repeatedly rerun in response to reactive data changes. Computations don't have return values; they just perform actions, such as rerendering a template on the screen. Computations are created using Tracker.autorun. Use stop to prevent further rerunning of a computation. Each time a computation runs, it may access various reactive data sources that serve as inputs to the computation, which are called its dependencies. At some futu

Tracker.active

Client Tracker.active import { Tracker } from 'meteor/tracker' Source True if there is a current computation, meaning that dependencies on reactive data sources will be tracked and potentially cause the current computation to be rerun.

this.userId

Server this.userId Source Access inside the publish function. The id of the logged-in user, or null if no user is logged in.

this.userId

Anywhere this.userId Source The id of the user that made this method call, or null if no user was logged in.

Tracker.afterFlush

Client Tracker.afterFlush(callback) import { Tracker } from 'meteor/tracker' Source Schedules a function to be called during the next flush, or later in the current flush if one is in progress, after all invalidated computations have been rerun. The function will be run once and not on subsequent flushes unless afterFlush is called again. Arguments callback Function A function to call at flush time.