import { createContext, useContext } from 'react'; import { JSON, Serializable } from '../types'; export type MFEContextData = Serializable; /** * Context used to pass data from the host to the MFEs */ export const MFEDataContext = createContext({}); export function useMFEDataContext>() { const context = useContext(MFEDataContext) as T; return context; }