Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Type aliases

ScaledSize

ScaledSize: RNScaledSize

Functions

Const useDimensions

  • useDimensions(): { screen: ScaledSize; window: ScaledSize }
  • Use this hook to access both the screen and window dimensions.

    const { screen, window } = useDimensions();

    Returns { screen: ScaledSize; window: ScaledSize }

    Object containing both screen and window dimensions.

    • screen: ScaledSize
    • window: ScaledSize

Const useScreenDimensions

  • useScreenDimensions(): ScaledSize
  • Use this hook to access the screen dimensions only.

    const { height, width, fontScale, scale } = useScreenDimensions();

    Returns ScaledSize

    Object containing screen dimensions

Const useWindowDimensions

  • useWindowDimensions(): ScaledSize
  • Use this hook to access the window dimensions only.

    This can be useful on Android devices, where the window has different dimensions than the screen.

    const { height, width, fontScale, scale } = useWindowDimensions();

    Returns ScaledSize

    Object containing window dimensions

Generated using TypeDoc