import { Translate } from '../../types' ; import { useTranslate } from '../../i18n' ; import { useCreateController , CreateProps , CreateControllerProps , } from './useCreateController' ; interface CreateControllerComponentProps extends CreateControllerProps { translate : Translate ; } interface Props extends CreateProps { children : ( params : CreateControllerComponentProps ) => JSX . Element ; } see useCreateController example export const CreateController = ( { children , ... props } ) => { const controllerProps = useCreateController ( props ) ; const translate = useTranslate ( ) ; return children ( { translate , ... controllerProps } ) ; } ;