Session
Session
Documentation of Meteor's client-side session API.
Session
provides a global object on the client that you can use to store an arbitrary set of key-value pairs. Use it to store things like the currently selected item in a list.
What’s special about Session
is that it’s reactive. If you call Session.get
("currentList")
from inside a template, the template will automatically be rerendered whenever Session.set
("currentList", x)
is called.
To add Session
to your application, run this command in your terminal:
meteor add session
Client Session.set(key, value)
import { Session } from 'meteor/
import { Session } from 'meteor/