Closed MartinMuzatko closed 8 years ago
https://github.com/voorhoede/riotjs-style-guide#assign-this-to-tag
With es6 lexical this syntax () => {} or function() {}.bind(this) it should be very easy to avoid something as redundant as var that = this or const tag = this
() => {}
function() {}.bind(this)
var that = this
const tag = this
Agree both are possible. Using const tag = this is simply our preference over function() {}.bind(this).
Also based on Angular Style Guide > var vm = this;.
var vm = this;
https://github.com/voorhoede/riotjs-style-guide#assign-this-to-tag
With es6 lexical this syntax
() => {}
orfunction() {}.bind(this)
it should be very easy to avoid something as redundant asvar that = this
orconst tag = this