Skip to content

Feature request: have Context.Provider throw error if missing value prop #19020

Closed
@heath-freenome

Description

@heath-freenome

Just about every time I set up a new Context.Provider, I end up accidentally specifying a values prop rather than value. While it's a minor error, generally I build the container in which the provider resides and commit it to the code base before I ever use it. It's only later when I go to use it that I realize I did it again. Since the Context.Provider seems pretty much useless without a value prop specified, I'd love it if there was a prop error if it is missing... especially if another prop is defined on the Context.Provider instead.

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