feat: 为 renderer 追加 displayName,以支持后续的反射功能

This commit is contained in:
humphry.hy 2022-07-12 19:55:38 +08:00 committed by 林熠
parent 282a30afa4
commit 6399cce05a

View File

@ -12,6 +12,7 @@ export function compWrapper(Comp: any) {
return createElement(Comp, this.props);
}
}
(Wrapper as any).displayName = Comp.displayName;
return cloneEnumerableProperty(forwardRef((props: any, ref: any) => {
return createElement(Wrapper, { ...props, forwardRef: ref });