Code review request: Optional context Provider pattern
I'm trying to find a context pattern that works with/without having to wrap context Provider in app tree.
The expected behavior: When there's context Provider in the app tree, consuming component receive states relative to Provider. Otherwise, the states should be scoped locally to the consuming component.
What would you like to suggest the following code. Any cons?
Thank you
ref: https://discord.com/channels/722131463138705510/1210366012881506304
The expected behavior: When there's context Provider in the app tree, consuming component receive states relative to Provider. Otherwise, the states should be scoped locally to the consuming component.
What would you like to suggest the following code. Any cons?
Thank you
ref: https://discord.com/channels/722131463138705510/1210366012881506304


