mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
fix(react, vue): remove sideeffects to improve treeshaking (#24313)
This commit is contained in:
@ -4,7 +4,6 @@ import {
|
||||
attachProps,
|
||||
createForwardRef,
|
||||
dashToPascalCase,
|
||||
defineCustomElement,
|
||||
isCoveredByReact,
|
||||
mergeRefs,
|
||||
} from './utils';
|
||||
@ -30,9 +29,11 @@ export const createReactComponent = <
|
||||
originalProps: StencilReactInternalProps<ElementType>,
|
||||
propsToPass: any,
|
||||
) => ExpandedPropsTypes,
|
||||
customElement?: any,
|
||||
defineCustomElement?: () => void,
|
||||
) => {
|
||||
defineCustomElement(tagName, customElement);
|
||||
if (defineCustomElement !== undefined) {
|
||||
defineCustomElement();
|
||||
}
|
||||
|
||||
const displayName = dashToPascalCase(tagName);
|
||||
const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {
|
||||
|
Reference in New Issue
Block a user