https://reactjs.org/docs/higher-order-components.html#use-hocs-for-cross-cutting-concerns gives example about HOC, here selectData is passed as second parameter. This parameter is a arraylist returned by a function, but is used again as a function. I am bit confused with this line:
data: selectData(DataSource, this.props), as firstly it should not be a function, secondly why it will need dataSource again as its wrapper function is filtering it already and what it will get in this.props.
https://reactjs.org/docs/higher-order-components.html#use-hocs-for-cross-cutting-concerns gives example about HOC, here selectData is passed as second parameter. This parameter is a arraylist returned by a function, but is used again as a function. I am bit confused with this line:
data: selectData(DataSource, this.props), as firstly it should not be a function, secondly why it will need dataSource again as its wrapper function is filtering it already and what it will get in this.props.