Open
Description
Summary
Yesterday I found out that independently wrapped components in Context doesn't share the same Context values. Instead each one has their own context values.
Page
https://react.dev/reference/react/useContext
Details
Now when I think about it that makes sense, but it took quite some time to realize where's the issue in a complext real world app where we render React components in different places of legacy code.
Would be great if we extend the Troubleshooting section of the Context docs to include this case.
Example: https://codesandbox.io/p/sandbox/reactcontext-issue-example-f48m4m