UNPKG

449 BJavaScriptView Raw
1import { componentFactory, $internalHooks } from './component';
2export { createDecorator, mixins } from './util';
3function Component(options) {
4 if (typeof options === 'function') {
5 return componentFactory(options);
6 }
7 return function (Component) {
8 return componentFactory(Component, options);
9 };
10}
11Component.registerHooks = function registerHooks(keys) {
12 $internalHooks.push(...keys);
13};
14export default Component;