Spencer Ahrens and Facebook Github Bot
5ec382d1be
New useWindowDimensions hook to replace most Dimensions usage
...
Summary:
Automatically provides and subscribes to dimension updates - super easy usage:
```
function MyComponent(props: Props) {
const {width, height, scale, fontScale} = useWindowDimensions();
return <Text ...
};
```
Only window for now - it's what people want 99% of the time, so we'll just shovel out a pit of success for them...
There are still cases where `Dimensions` is needed outside of React component render functions, like in GraphQL variables, so we need to keep the existing module.
Reviewed By: zackargyle
Differential Revision: D16525189
fbshipit-source-id: 0a049fb3be8d92888a8a69e3898d337b93422a09
2019-07-29 11:09:44 -07:00
..
2019-07-11 01:38:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-23 03:23:11 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-29 11:09:44 -07:00
2019-07-15 13:31:48 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-23 18:45:24 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-06-21 03:05:59 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-22 15:39:01 -07:00
2019-05-28 08:39:18 -07:00
2019-05-29 18:11:43 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-29 16:37:15 -07:00
2019-06-06 04:52:19 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-13 09:00:51 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-07-23 03:23:11 -07:00
2019-05-28 08:39:18 -07:00
2019-05-30 14:29:42 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00
2019-05-28 08:39:18 -07:00