Skip to content

Commit ef5e490

Browse files
committed
remove state modalOpened
1 parent 3126e49 commit ef5e490

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

packages/rn-tester/js/examples/Modal/ModalPresentation.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,7 @@ function ModalPresentation() {
8787
if (action === 'onShow') {
8888
alert('onShow');
8989
}
90-
if (ref != null) {
91-
setModalOpened(true);
92-
}
93-
};
94-
95-
React.useEffect(() => {
96-
if (ref != null && modalOpened === true) {
90+
if (ref != null && visible === true) {
9791
if (Platform.OS === 'ios') {
9892
// $FlowFixMe
9993
AccessibilityInfo.sendAccessibilityEvent(ref.current, 'focus');
@@ -102,7 +96,7 @@ function ModalPresentation() {
10296
AccessibilityInfo.sendAccessibilityEvent(ref.current, 'viewHoverEnter');
10397
}
10498
}
105-
}, [modalOpened]);
99+
};
106100

107101
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
108102
* LTI update could not be added via codemod */

0 commit comments

Comments
 (0)