##Ideas
###Tuple
const a = ('hello', 'world')
a._1 // 'hello'
to
const a = { _1: 'hello', _2: 'world'}
a._1 // 'hello'
###Functions
##Thinking
const mapStateToProps = ({ loading, locked, init, orderType, stateCounter, access }) => ({
loading,
locked,
init,
orderType,
stateCounter,
access
});
###Switch
This is horrible (change required)
- variant A
switch(type) {
case value:
break;
default:
break;
}
- variant B
switch(type) {
case value:
return ...;
default:
return ...;
}
- variant C (for scope based variables
const
,let
)
switch(type) {
case value: {
return ...
}
default: {
return ...
}
}