mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add example of getting window dimensions to Dimensions docs
By @calvinf Closes https://github.com/facebook/react-native/pull/4211
This commit is contained in:
@@ -57,6 +57,8 @@ class Dimensions {
|
||||
* than caching the value (for example, using inline styles rather than
|
||||
* setting a value in a `StyleSheet`).
|
||||
*
|
||||
* Example: `var {height, width} = Dimensions.get('window');`
|
||||
*
|
||||
* @param {string} dim Name of dimension as defined when calling `set`.
|
||||
* @returns {Object?} Value for the dimension.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user