import { createContext } from 'react' ; see { SimpleFormIterator } see { ArrayInput } export const SimpleFormIteratorContext = createContext < SimpleFormIteratorContextValue > ( undefined ) ; export type SimpleFormIteratorContextValue = { total : number ; add : ( ) => void ; remove : ( index : number ) => void ; reOrder : ( index : number , newIndex : number ) => void ; } ;