英文:
Impossible to use WebStorm with React + MUI
问题
I am using WebStorm 2022 with React, JavaScript and MUI -- and I have been getting insanely slow performance, that it's become impossible to use.
Autocomplete takes around 6-7 seconds to load, and my CPU usage rockets up to 100% whenever I type anything in my JSX file.
Example code:
function UserInputBox() {
return (
<Box
display="flex"
flexDirection="column"
alignItems="center" p={5} boxShadow={3}
>
<Box
p={5}
sx={{background: "blue", alignItems: "stretch"}}
>
<h1>User Input</h1>
</Box>
<Stack spacing={2}>
<TextField label="Username" />
<TextField label="Age (Years)" />
<Button
variant="contained"
sx={{borderRadius: 28, textTransform: "none"}}
>
Add User
</Button>
</Stack>
</Box>
)
}
export default UserInputBox
英文:
I am using WebStorm 2022 with React, JavaScript and MUI -- and I have been getting insanely slow performance, that it's become impossible to use.
Autocomplete takes around 6-7 seconds to load, and my CPU usage rockets up to 100% whenever I type anything in my JSX file.
Example code:
function UserInputBox() {
return (
<Box
display="flex"
flexDirection="column"
alignItems="center" p={5} boxShadow={3}
>
<Box
p={5}
sx={{background: "blue", alignItems: "stretch"}}
>
<h1>User Input</h1>
</Box>
<Stack spacing={2}>
<TextField label="Username" />
<TextField label="Age (Years)" />
<Button
variant="contained"
sx={{borderRadius: 28, textTransform: "none"}}
>
Add User
</Button>
</Stack>
</Box>
)
}
export default UserInputBox
答案1
得分: 1
由于WebStorm中的错误,出现了这个问题。他们已经修复了它,可能会在下一个EAP构建版本中发布。请查看下面的链接以获取更多信息。
https://youtrack.jetbrains.com/issue/WEB-59766/Very-slow-code-analysis-in-React-MUI-Javascript-code
英文:
That was due to the bug in webstorm. They had fixed it and will probably comes in the next EAP build. Check below link for activity.
https://youtrack.jetbrains.com/issue/WEB-59766/Very-slow-code-analysis-in-React-MUI-Javascript-code
答案2
得分: 0
我在我的 Mac 上遇到了相同的问题。解决方案是简单地安装版本2022.2,而不是2022.3。
英文:
I had the same problem on my mac. The solution is to simply install version 2022.2 instead of 2022.3
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论