Basically when the footer is dismissed within the same view, it triggers a new layout, which since we call a remeasurement with a post call, this remeasurement may happen after the view has been removed from the window. This view requires access to the context to be able to obtain the ViewModel in the underlying composable, causing a crash.
This fixes https://github.com/RevenueCat/react-native-purchases/issues/994
Basically when the footer is dismissed within the same view, it triggers a new layout, which since we call a remeasurement with a
post
call, this remeasurement may happen after the view has been removed from the window. This view requires access to the context to be able to obtain theViewModel
in the underlying composable, causing a crash.