diff --git a/app/dimensions.tsx b/app/dimensions.tsx index afa86d38b..cd45a1f9d 100644 --- a/app/dimensions.tsx +++ b/app/dimensions.tsx @@ -26,6 +26,9 @@ export const DimensionsContext = React.createContext( Dimensions.get('window') as IDimensionsContextProps ); +/** + * @deprecated use RN's useWindowDimensions hook instead + */ export function withDimensions(Component: React.ComponentType & TNavigationOptions): typeof Component { const DimensionsComponent = (props: T) => ( {contexts => } @@ -35,8 +38,14 @@ export function withDimensions(Component: React.ComponentType< return DimensionsComponent; } +/** + * @deprecated use RN's useWindowDimensions hook instead + */ export const useDimensions = () => React.useContext(DimensionsContext); +/** + * @deprecated use RN's useWindowDimensions hook instead + */ export const useOrientation = () => { const { width, height } = React.useContext(DimensionsContext); const isPortrait = height > width;