Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Session.equals #118

Closed
dferber90 opened this issue Mar 7, 2016 · 0 comments
Closed

Session.equals #118

dferber90 opened this issue Mar 7, 2016 · 0 comments
Labels

Comments

@dferber90
Copy link
Contributor

Suggest usage of Session.equals('foo', true) over Session.get('foo') === true for scalar types, as it triggers fewer recomputations.

// If value is a scalar, then these two expressions do the same thing:

Session.get("key") === value // (1) 
Session.equals("key", value) // (2)
// ... but the second one is always better. It triggers fewer invalidations (template redraws), making your program more efficient.

source.

@dferber90 dferber90 added this to the Version 2 milestone Mar 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant