import { useLayoutEffect, useState } from "react";
/**
 * This provides an interface for async loading of modules
 */
export default function useModule(moduleLoadPromiseFactory) {
    const [moduleLoaded, setModuleLoaded] = useState();
    useLayoutEffect(() => {
        moduleLoadPromiseFactory().then(setModuleLoaded);
    }, []);
    return moduleLoaded;
}
//# sourceMappingURL=useModule.js.map