import useListController , { ListProps , ListControllerProps , } from './useListController' ; import { useTranslate } from '../i18n' ; import { Translate } from '../types' ; interface ListControllerComponentProps extends ListControllerProps { translate : Translate ; } interface Props extends ListProps { children : ( params : ListControllerComponentProps ) => JSX . Element ; } see useListController example const ListController = ( { children , ... props } ) => { const controllerProps = useListController ( props ) ; const translate = useTranslate ( ) ; return children ( { translate , ... controllerProps } ) ; } ; export default ListController ;