ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
22 lines • 661 B
JavaScript
import { createContext } from 'react';
/**
* Context to store the result of the useEditController() hook.
*
* Use the useEditContext() hook to read the context. That's what the Edit components do in react-admin.
*
* @example
*
* import { useEditController, EditContextProvider } from 'ra-core';
*
* const Edit = props => {
* const controllerProps = useEditController(props);
* return (
* <EditContextProvider value={controllerProps}>
* ...
* </EditContextProvider>
* );
* };
*/
export var EditContext = createContext(null);
EditContext.displayName = 'EditContext';
//# sourceMappingURL=EditContext.js.map