[RN] Listen to modal state when integrated with navigation and used as screen #2149
AndiCrisan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Proposition
A global listener is required to monitor the focus status of the BottomSheetModal screen (when integrated within react-native navigation) from different screens. Based on this focus status, various actions can be triggered in response to whether the modal is in focus or not.
Why it is needed
This functionality may optimise modals implementation by enabling tailored responses as users interact with the BottomSheetModal screen, improving the overall component integration quality.
Possible implementation
Implement a global event listener that can offer the status of the modal screen and be accessed from any screen within the application (see code Sample as possible solution). The listener will track the focus state of the BottomSheetModal screen and enable other screens to have the possibility react accordingly if needed.
Code sample
May be an extracted value from the already exposed hook.
Beta Was this translation helpful? Give feedback.
All reactions