mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-03 09:17:55 +08:00
update the way of using module Dimensions
This commit is contained in:
@@ -529,7 +529,9 @@ make them customizable, React Native exposes a
|
||||
[NavigatorSceneConfigs](https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/Navigator/NavigatorSceneConfigs.js) API.
|
||||
|
||||
```javascript
|
||||
var SCREEN_WIDTH = require('Dimensions').get('window').width;
|
||||
var React = require('react-native');
|
||||
var { Dimensions } = React;
|
||||
var SCREEN_WIDTH = Dimensions.get('window').width;
|
||||
var BaseConfig = Navigator.SceneConfigs.FloatFromRight;
|
||||
|
||||
var CustomLeftToRightGesture = Object.assign({}, BaseConfig.gestures.pop, {
|
||||
|
||||
Reference in New Issue
Block a user