You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.