mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
set modal rendered state to false on unmount (#47078)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47078 Changelog: [Internal] in fabric, we've found a scenario where this modal state update is required to cleanup all artifacts from the modal presentation views. it is safe to add this back, as it was originally removed for a scenario that no longer exists. Reviewed By: shwanton Differential Revision: D64388550 fbshipit-source-id: f13571260379554b0126c379ace9f9e1b81866be
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0ba00fc998
commit
2ffd31bbd7
@@ -224,6 +224,9 @@ class Modal extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (Platform.OS === 'ios') {
|
||||
this.setState({isRendered: false});
|
||||
}
|
||||
if (this._eventSubscription) {
|
||||
this._eventSubscription.remove();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user