import * as React from 'react' ; import { ReactElement } from 'react' ; import { Record } from '../../types' ; import { RecordContextProvider } from '../RecordContext' ; import { CreateContext } from './CreateContext' ; import { CreateControllerProps } from './useCreateController' ; import { SaveContextProvider , usePickSaveContext } from './SaveContext' ; example see CreateContext see RecordContext export const CreateContextProvider = ( { children , value , } ) => ( < CreateContext . Provider value = { value } > < SaveContextProvider value = { usePickSaveContext ( value ) } > < RecordContextProvider < Partial < Record > > value = { value && value . record } > { children } < /RecordContextProvider> < /SaveContextProvider> < /CreateContext.Provider>);