import useMutation from './useMutation' ; interface ChildrenFuncParams { data ? : any ; total ? : number ; error ? : any ; loading : boolean ; loaded : boolean ; } export interface MutationProps { children : ( mutate : ( event ? : any , callTimePayload ? : any , callTimeOptions ? : any ) => void | Promise < any > , params : ChildrenFuncParams ) => JSX . Element ; type : string ; resource ? : string ; payload ? : any ; options ? : any ; } param { Function } children param { string } type param { string } resource param { Object } payload param options param { string } options . action param { boolean } options . undoable param { boolean } options . returnPromise param { Function } options . onSuccess param { Function } options . onFailure example const Mutation = ( { children , type , resource , payload , options = { onSuccess : undefined } , } ) => children ( ... useMutation ( { type , resource , payload } , { ... options , withDeclarativeSideEffectsSupport : true } ) ) ; export default Mutation ;