Skip to content

[Suggestion]: Clarify recommendation status for using <Context> without .Provider #7907

@limonatasuyu

Description

@limonatasuyu

Summary

The React docs confirm that using without .Provider is valid in React 19+, but do not clarify if this shorthand is recommended, discouraged, or simply an alternative. Clear guidance on the preferred usage would help developers make informed decisions.

Page

https://react.dev/reference/react/createContext#provider

Details

Hi React team,

The documentation mentions that using directly without .Provider (e.g., ) is valid and works as a shorthand in React 19 and later.

What isn’t clear from the docs is whether this shorthand usage is:

Recommended as the preferred approach,

Discouraged in favor of the explicit <Context.Provider>,

Or simply provided as an alternative syntax with no particular preference.

It would be very helpful if the docs explicitly clarified the intent or guidance around this usage pattern, so developers can confidently choose the best approach for their codebases.

Thanks for your great work and consideration!

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