O'Reilly logo

Meteor Design Patterns by Marcelo Reyna

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

Variable types

There are four types of variables that we need to understand to optimize our frontend workflow: session, persistent, file scope, and ReactiveVar. With these variables, we can build dynamic sites easily based on how the user is interacting with the view.

The session variables are variables that exist only during a session. A session begins whenever a user hits the site. These variables can be shared across routes and are reactive.

The persistent variables are variables that are stored in local storage so that they can be read even after the session closes.

The file scoped variables are variables that only exist within the scope of the file. These are generally not reactive.

The ReactiveVar variables can be scoped to the file or globally ...

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