Created
November 30, 2018 19:31
-
-
Save kashishgrover/bd0a82ef2fbbe26b4016ccc95bff60b8 to your computer and use it in GitHub Desktop.
React Native index.js with default props example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Text, TouchableOpacity } from 'react-native'; | |
Text.defaultProps = { | |
...Text.defaultProps, | |
allowFontScaling: false, | |
}; | |
// In other news, we do this as well because 0.6 is too weird | |
TouchableOpacity.defaultProps = { | |
...TouchableOpacity.defaultProps, | |
activeOpacity: 0.8, | |
}; | |
. | |
. | |
. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much!! been looking for this since long..