diff --git a/src/index.js b/src/index.js index 4a805b06..4dad832a 100644 --- a/src/index.js +++ b/src/index.js @@ -16,8 +16,6 @@ import { ActivityIndicator } from 'react-native' -const { width, height } = Dimensions.get('window') - /** * Default styles * @type {StyleSheetPropType} @@ -230,6 +228,8 @@ export default class extends Component { } // Default: horizontal + const { width, height } = Dimensions.get('window') + initState.dir = props.horizontal === false ? 'y' : 'x' initState.width = props.width || width initState.height = props.height || height