UNPKG

react-obsidian

Version:

Dependency injection framework for React and React Native applications

12 lines (10 loc) 327 B
type Options = { scope?: 'component' | 'feature'; }; export function LifecycleBound(options?: Options) { return (constructor: any) => { Reflect.defineMetadata('isLifecycleBound', true, constructor); Reflect.defineMetadata('lifecycleScope', options?.scope ?? 'feature', constructor); return constructor; }; }