Closed danielrhodes closed 1 year ago
Hi @danielrhodes — could you please a make a small repro so i can debug it?
I think i'm calling the internal view cleanup routine too early, or might be re-using the stale views — but i can't seem to repro it (it's been a while since i've looked at the code for this project agajksgdjkasfkhsgl).
I'll add the repro you provide for future bug testing in the example app
hi, sorry for the late reply - i think i might need to re-think how the cleanup routine get triggered
I released a new version of this library that uses ✨ expo-modules ✨ (pleas see: Installation - Expo Modules Re-Write) asdasfjkdsfjl
I updated a new mode to internalCleanupMode
called didMoveToWindowNil
, and also added shouldCleanupOnComponentWillUnmountForAuxPreview
+ shouldCleanupOnComponentWillUnmountForMenuPreview
props.
In the meantime, i will continue to do more testing; if it's still an issue w/ the newer version, please tag me or re-open this issue asdfghjklvdfkbjl
thanks 💖
I've seen some other people mention things similar to this issue.
A crash occurs when the underlying component that the on-screen native context menu wraps around is unmounted. In this specific case, it is attached to a List cell that got re-rendered. But it applies to any component that gets unmounted.
The primary issue, outside of this being a native level crash, is because these native views are outside the React view hierarchy, they will not go away unless the app is forced closed.
I've found two workarounds. One is to dismiss the menu on unmount (when the props change).
The other, which seems more preferable (for my use case where the context is attached to a List item):
is