UNPKG

@grafana/ui

Version:
20 lines (15 loc) 428 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var reactUse = require('react-use'); "use strict"; const useAsyncDependency = (importStatement) => { const state = reactUse.useAsync(async () => { return await importStatement; }); return { ...state, dependency: state.value }; }; exports.useAsyncDependency = useAsyncDependency; //# sourceMappingURL=useAsyncDependency.cjs.map