Skip to content

Unexpected usage of context prop on connected component #1139

Closed
@Shamilik

Description

@Shamilik

Do you want to request a feature or report a bug?
Bug/Unexpected behavior

What is the current behavior?
When passing context prop to connected component, it's replacing original Context and connect() returning an undefined.

Related code line:

const ContextToUse = this.props.context || Context

Example:
https://codesandbox.io/s/mm039l9q7x

What is the expected behavior?
Not use context prop or document this behavior.

Which versions of React, ReactDOM/React Native, Redux, and React-Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React-Redux?
Latest

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