Open mrjackdavis opened 1 year ago
You are wrong about using Context Api from ReactNative, please read more about how to use context, this issues does not related with Hold menu
@fukemy in what way?
As per the docs, I expect React components which are children of a context provider to have that corresponding context value.
Note that this behaviour seems to be an issue with the underlying react-native-portal
as a couple of others have confirmed here.
If you're certain that my understanding is incorrect, or perhaps my untested example is incorrect, I'm keen to understand why if you could explain :)
Describe the bug
HoldItem
do not respect the react context in which they are rendered in. They seem to be rendered in the context of their HoldMenuProviderTo Reproduce
n.b. this is a simplified, untested example of what I'm experiencing. LMK if there are any issues.
Expected behavior In the example above, I expect
MyComponent
to render 123.I expect this because it is rendered inside of that context
Actual behavior In the example above,
MyComponent
renders 0.It appears MyComponent is actually rendered where HoldMenuProvider is rendered, receiving that context
Screenshots None
Package versions
Additional context Add any other context about the problem here.