Closed sugarshin closed 8 years ago
Can we please remove all lodash functions except throttle? We can use all native functions instead.
And remove compact
. Might need a bit of refactoring.
pls check it out.
In general, I think it looks ok, but please remove all .bind()
in render and I'll review once again after :)
How's this?
Object.keys(this.props.modifiers).forEach((function(_this){
return function(index){
var hex = _this.props.modifiers[index];
...
};
})(this));
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
More like this:
Object.keys(this.props.modifiers).forEach(function(index) {
var hex = this.props.modifiers[index];
}, this);
// or
var modifiers = this.props.modifiers;
Object.keys(modifiers).forEach(function(index) {
var hex = modifiers[index];
});
How about?
looks good
@tommoor pls review :)
Hey both, just had a quick skim and this looks good - I'm going to do my best to test and merge with a new release in next 24hours, bear with me :)
Thanks for your work here! I implemented this in 457f5aad7a6a3fcfed7d8194da96a448b010e2f5 as the extra code for native methods is not worth the loss of readability in my mind.
Thank you merged prev PR !
lodash
hasunderscore
compatible, it will also be small fill size after build by require for each function. This, I think that problem is solved in the case of dependent on the large library, such as theunderscore
.