Function useResponsiveColumns

  • Custom hook for determining the column count of a FlatList based on screen orientation and device size, using useReducer for state management.

    Parameters

    • config: ResponsiveColumnsConfig

      Specifies the column counts for each orientation and device size.

    • breakpoints: Breakpoints = ...

      Custom size breakpoints for screen categories (xs, sm, md, lg).

    Returns {
        loadingTileCount: boolean;
        tileCount: number;
    }

    • An object containing the current column count and a loading state.
    • loadingTileCount: boolean
    • tileCount: number