UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

31 lines 889 B
import * as React from 'react'; import { ReactNode } from 'react'; import { CreateControllerResult } from './useCreateController'; /** * Create a Create Context. * * @example * * const MyCreate = (props) => { * const controllerProps = useCreateController(props); * return ( * <CreateContextProvider value={controllerProps}> * <MyCreateView> * </CreateContextProvider> * ); * }; * * const MyCreateView = () => { * const record = useRecordContext(); * // or, to rerender only when the save operation change but not data * const { saving } = useCreateContext(); * } * * @see CreateContext * @see RecordContext */ export declare const CreateContextProvider: ({ children, value, }: { children: ReactNode; value: CreateControllerResult; }) => React.JSX.Element; //# sourceMappingURL=CreateContextProvider.d.ts.map