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:
parent
1e086605b6
commit
ae9d2ce35c
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue