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:
Martin Konicek 2015-12-22 17:34:17 +01:00
parent 1e086605b6
commit ae9d2ce35c
1 changed files with 2 additions and 0 deletions

View File

@ -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.
*/