function CategoriesProvider
CategoriesProvider(unnamed 0: CategoriesProviderProps): React.JSX.Element

Provides CategoriesContext, fetching the categories on mount. Until a fetch succeeds, isLoaded stays false, so that no page takes an empty list for the truth and answers a category's URL with a 404; a failed first fetch is tried again 10 s later. A failed refresh keeps the previous list.

Parameters

Return Type

React.JSX.Element

Usage

import { CategoriesProvider } from "src/contexts/category/CategoriesProvider.tsx";