What I want to remember for later
get notifier() {
delete this.notifier;
return this.notifier = document.getElementById('bookmarked-notification-anchor');
},
It is support for scopes in switch also
//not:
(({ someProp }, otherVar) => {
switch (expression)
case 'onething':
const { someProp } = otherVar // Doing this yesterday made a lot of mess in the scope.
return someProp // Babel did not throw even tho 'someProp' was in the
// scope already.
}
)(someVar)
//do:
(({ someProp }, otherVar) => {
switch (expression)
case 'onething': {
const { someProp } = otherVar // Now it got it's own scope!
return someProp
}
}
)(someVar)