Skip to content

Use Modal's onDismiss to prevent Alert bug#22

Open
Ashoat wants to merge 1 commit intowookoinc:masterfrom
Ashoat:master
Open

Use Modal's onDismiss to prevent Alert bug#22
Ashoat wants to merge 1 commit intowookoinc:masterfrom
Ashoat:master

Conversation

@Ashoat
Copy link

@Ashoat Ashoat commented Feb 12, 2018

There is an annoying issue in React Native where if you call an Alert right as a Modal is being closed, it can crash the UI thread: facebook/react-native#10471

The solution, which is available in RN 0.50, is a new callback property on Modal called onDismiss. Calling Alert from within this callback is safe.

This PR makes it so this component calls the user callback from within onDismiss. It should have no impact if the user is not calling Alert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant