Source: RegistryProvider.js

  1. /**
  2. * Internal. This is the component which inject the registry as child context.
  3. * It is called by the App component
  4. * @module react-cmf/lib/RegistryProvider
  5. * @see module:react-cmf/lib/App
  6. */
  7. import { createContext } from 'react';
  8. import Registry from './registry';
  9. export const RegistryContext = createContext(Registry.getRegistry());
  10. export const RegistryProvider = RegistryContext.Provider;
  11. export default RegistryContext.Provider;