Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have backdrop always useNativeDriver={true} #249

Merged

Conversation

scottmas
Copy link
Contributor

@scottmas scottmas commented Feb 8, 2019

The backdrop element is a simple view that only ever has its opacity animated, which always works with useNativeDriver={true} (see https://facebook.github.io/react-native/docs/animations#caveats).

This seems to be a no-brainer non-breaking performance improvement which will help all users.

The backdrop element is a simple view that only ever has its opacity animated, which _always_ works with `useNativeDriver={true}` (see https://facebook.github.io/react-native/docs/animations#caveats). This seems to be a no-brainer non-breaking performance improvement.
@@ -491,7 +491,7 @@ class ReactNativeModal extends Component {
<TouchableWithoutFeedback onPress={onBackdropPress}>
<View
ref={ref => (this.backdropRef = ref)}
useNativeDriver={useNativeDriver}
useNativeDriver={true}
style={[
styles.backdrop,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense (the idea initially was to allow custom styling for it, hence it was not a default).
Thank you for the PR.

@mmazzarolo mmazzarolo merged commit 2351ccd into react-native-modal:master Feb 8, 2019
@mmazzarolo
Copy link
Member

Landed in v8.0.0-beta.1 🛬

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.

None yet

2 participants