UNPKG

rerumaccusamus

Version:

The meta-framework suite designed from scratch for frontend-focused modern web development.

28 lines (22 loc) 675 B
import { createAsyncWaterfall } from '../../../../src'; import { createPlugin, registerHook, useRunner } from '../core'; // declare new lifecircle type declare module '../core' { interface ExternalProgress { fooWaterfall: typeof fooWaterfall; } } // create new manage model of new lifecircle 新生命周期运行管理模型创建 const fooWaterfall = createAsyncWaterfall(); const foo = createPlugin(() => { // registe new lifecircle registerHook({ fooWaterfall }); return { preDev: () => { // run new lifecircle // eslint-disable-next-line react-hooks/rules-of-hooks useRunner().fooWaterfall(); }, }; }); export default foo;