Skip to content

Add <Subscriber quiet> prop to avoid invariant when rendered out of context #41

@mjackson

Description

@mjackson

Currently, if you render a <Subscriber> out of context it'll throw an invariant. This is similar to the context API itself, where if you try to use this.context.cupcakes outside the appropriate context you'll get an error.

What we don't have is a way for users to opt-out of the invariant when they're not rendered in the right context. This would be the equivalent of the isRequired functionality currently available to consumers of the context API through contextTypes.

The idea would be to add <Subscriber quiet> to opt-out of the invariant in these situations.

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