Skip to content

HOC Page #2309

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions