import { Translate } from '../../types' ; import { useTranslate } from '../../i18n' ; import { useEditController , EditProps , EditControllerProps , } from './useEditController' ; interface EditControllerComponentProps extends EditControllerProps { translate : Translate ; } interface Props extends EditProps { children : ( params : EditControllerComponentProps ) => JSX . Element ; } see useEditController example export const EditController = ( { children , ... props } ) => { const controllerProps = useEditController ( props ) ; const translate = useTranslate ( ) ; return children ( { translate , ... controllerProps } ) ; } ;