reduce params in react es6
Code can be cleaned by reducing number of params sent to function.
Sending a value to function? this.state.something
can directly set in function call.
example
Instead of this
renderBlock = (someFlag) => {...}
return({
{this.renderBlock(this.state.someFlag)}
})
Use this
...
renderBlock = (someFlag = this.state.someFlag) => {...}
return({
{this.renderBlock()}
})
...