Interface UseCategoriesReturn

The return type for the useCategories hook, providing methods and state to manage categories within a project.

Hierarchy

  • UseCategoriesReturn

Properties

categories: CategoryType[]

An array of category objects representing the fetched categories.

Function to create a new category. Accepts category details and returns the created category.

currentPage: number

The current page index in the pagination state.

Function to load additional categories. Accepts an optional flag to either refresh the current data or append new data.

fetched: boolean

Boolean indicating whether the categories have been fully fetched (true) or are still loading (false).

hasMore: boolean

Boolean indicating whether more categories are available for fetching (pagination state).

Function to refetch all categories from the beginning. Optionally accepts a quiet flag to suppress unnecessary state updates.

Generated using TypeDoc