Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/component lifecycle not execute #2690

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions packages/renderer-core/src/renderer/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,5 @@ export default function componentRendererFactory(): IBaseRenderComponent {

return this.__renderComp(Component, this.__renderContextProvider({ compContext: this }));
}

getComponentName() {
return this.props?.componentName;
}

/** 需要重载下面几个方法,如果在低代码组件中绑定了对应的生命周期时会出现死循环 */
componentDidMount() {
this.__debug(`componentDidMount - ${this.getComponentName()}`);
}
getSnapshotBeforeUpdate() {
this.__debug(`getSnapshotBeforeUpdate - ${this.getComponentName()}`);
}
componentDidUpdate() {
this.__debug(`componentDidUpdate - ${this.getComponentName()}`);
}
componentWillUnmount() {
this.__debug(`componentWillUnmount - ${this.getComponentName()}`);
}
componentDidCatch() {
this.__debug(`componentDidCatch - ${this.getComponentName()}`);
}
};
}
Loading