a564af853f
Summary: I thought it would be useful to help clear out references to no longer used styles and also catch typos on style names to have flow error when we try to access a style that isn't defined. Example: ```javascript export default class AuthenticationScreen extends React.Component { render() { // This throws an error because `continer` is misspelled return ( <View style={styles.continer} /> ) } } const styles = StyleSheet.create({ container: { flex: 1, }, } ``` ```javascript export default class AuthenticationScreen extends React.Component { render() { // This throws an error because no fancyContainer style is defined return ( <View style={[styles.container, styles.fancyContainer]} /> ) } } const styles = StyleSheet.create({ container: { flex: 1, }, } ``` All credit goes to jeffmo in this tweet: https://twitter.com/lbljeffmo/status/755179096271888385 Also included in the PR is some cleanup on styles that Closes https://github.com/facebook/react-native/pull/8876 Differential Revision: D3584983 Pulled By: yungsters fbshipit-source-id: 0ee0e12ff3d976c137d932688e323c26690e0a52 |
||
---|---|---|
.. | ||
__tests__ | ||
ColorPropType.js | ||
EdgeInsetsPropType.js | ||
LayoutPropTypes.js | ||
PointPropType.js | ||
StyleSheet.js | ||
StyleSheetPropType.js | ||
StyleSheetTypes.js | ||
StyleSheetValidation.js | ||
TransformPropTypes.js | ||
flattenStyle.js | ||
normalizeColor.js | ||
processColor.js | ||
processTransform.js | ||
setNormalizedColorAlpha.js |