Skip to content

Add context to the parameters of the mapping function #69

@eyalw

Description

@eyalw

Why don't we also pass context as a second parameter to the data-mapping function?
I looks like only props are passed:
https://github.com/heroku/react-refetch/blob/master/src/components/connect.js#L156

I wish I could also access the context like so:

DataSourceEditModal = connect((props, context) => {

  // .... check context for router or other state in it. ....

  return { ...mapping... };
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions