function mapItems
mapItems<T>(fn: (items: T[]) => T[]): (list: PagedList<T>) => PagedList<T>

Returns a setter of a list's items as a setter of the list, for the sync hooks, which edit items only.

Type Parameters

Parameters

fn: (items: T[]) => T[]

Return Type

(list: PagedList<T>) => PagedList<T>

Usage

import { mapItems } from "src/utils/feed/pagedList.ts";