alibaba / alibaba/lowcode-engine

使用渲染模块后只要更新别的state后,组件就会重新走渲染生命周期也会在此执行

Open
#2,286 2 comments 0 reactions 1 assignee Claimed by @liujuping View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

使用渲染模块,一旦setInit重新修改值,components下的组件就会重新执行渲染。会导致出现意想不到的问题。比如ant-design的树会全部展开,pro-table会重复刷新等等。使用的是es模块的方式导入组件的
```
const Index = (props) => {
const [init, setInit] = useState(false);

const schema = {
componentName: "Page",
props: {},
children: [
{
componentName: "Button",
props: {
type: "primary",
style: {
color: "#2077ff"
}
},
children: "确定"
}
]
};

const components = {
Button
};

return ;
};
export default Index;

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.