import { useContext } from 'react' ; import ListPaginationContext , { ListPaginationContextValue , } from './ListPaginationContext' ; typedef ListPaginationContextValue prop { integer } total prop { integer } page prop { Function } setPage prop { integer } perPage prop { Function } setPerPage prop { string } resource returns { ListPaginationContextValue } see useListController const useListPaginationContext = ( props ? ) : ListPaginationContextValue => { const context = useContext ( ListPaginationContext ) ; if ( ! context . setPage ) { deprecated if ( process . env . NODE_ENV !== 'production' ) { console . log ( "List components must be used inside a <ListContextProvider>. Relying on props rather than context to get List data and callbacks is deprecated and won't be supported in the next major version of react-admin." ) ; } return props ; } return context ; } ; export default useListPaginationContext ;