import { createContext } from 'react' ; import { ListControllerProps } from './useListController' ; typedef ListControllerProps prop { Object } data prop { Array } ids prop { integer } total prop { boolean } loaded prop { boolean } loading prop { integer } page prop { Function } setPage prop { integer } perPage prop { Function } setPerPage prop { Object } currentSort prop { Function } setSort prop { Object } filterValues prop { Function } setFilters prop { Object } displayedFilters prop { Function } showFilter prop { Function } hideFilter prop { Array } selectedIds prop { Function } onSelect prop { Function } onToggleItem prop { Function } onUnselectItems prop { string } basePath prop { string } defaultTitle prop { string } resource prop { Function } refetch typedef Props prop { ListControllerProps } value param { Props } see useListController see useListContext example const ListContext = createContext < ListControllerProps > ( { basePath : null , currentSort : null , data : null , defaultTitle : null , displayedFilters : null , filterValues : null , hasCreate : null , hideFilter : null , ids : null , loaded : null , loading : null , onSelect : null , onToggleItem : null , onUnselectItems : null , page : null , perPage : null , refetch : null , resource : null , selectedIds : null , setFilters : null , setPage : null , setPerPage : null , setSort : null , showFilter : null , total : null , } ) ; ListContext . displayName = 'ListContext' ; export default ListContext ;